*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f5f0eb;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8f5;
    --text: #2d2a26;
    --text-muted: #7a756e;
    --text-faint: #b0a99f;
    --accent: #3aafaa;
    --accent-dim: #e0f5f4;
    --accent-hover: #2d8e8a;
    --border: #e5dfd8;
    --border-strong: #d1c9bf;
    --tag-bg: #eef7f6;
    --tag-border: #c5e5e3;
    --tag-text: #2d7a77;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --grain-opacity: 0.03;
    --project-accent: #c084fc;
}

[data-theme="dark"] {
    --bg: #181825;
    --bg-card: #1e1e2e;
    --bg-card-hover: #252536;
    --text: #cdd6f4;
    --text-muted: #a6adc8;
    --text-faint: #585b70;
    --accent: #89dceb;
    --accent-dim: #1e3a3f;
    --accent-hover: #74c7ec;
    --border: #313244;
    --border-strong: #45475a;
    --tag-bg: #1e2d3a;
    --tag-border: #3a5a6a;
    --tag-text: #89dceb;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
    --grain-opacity: 0.04;
    --project-accent: #cba6f7;
}

[data-theme="konami"] {
    --bg: #0a0015;
    --bg-card: #15002a;
    --bg-card-hover: #1f0040;
    --text: #e0b0ff;
    --text-muted: #b388d9;
    --text-faint: #6a3d8a;
    --accent: #ff6ec7;
    --accent-dim: #3a0028;
    --accent-hover: #ff8ad4;
    --border: #4a1070;
    --border-strong: #6a20a0;
    --tag-bg: #2a0050;
    --tag-border: #6a20a0;
    --tag-text: #ff6ec7;
    --shadow: 0 1px 3px rgba(255,110,199,0.15), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(255,110,199,0.25), 0 2px 4px rgba(0,0,0,0.3);
    --grain-opacity: 0.05;
    --project-accent: #ff6ec7;
    --project-accent: #ff6ec7;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}
.theme-toggle:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
html:not([data-theme]) .theme-toggle .icon-sun { display: none; }
html:not([data-theme]) .theme-toggle .icon-moon { display: block; }

.wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

h1, h2, h3 {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.25rem;
    line-height: 1.1;
    color: var(--text);
}

.subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-top: 0.75rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.3s;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.75rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

nav {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

nav a {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

section {
    margin-top: 3rem;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 2rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--tag-border);
    border-radius: 999px;
    background: var(--accent-dim);
}

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6ecf76;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.identity-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.identity-text strong {
    color: var(--text);
    font-weight: 600;
}

.services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.service-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.service-item h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.service-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--tag-border);
    border-radius: 6px;
    background: var(--tag-bg);
    color: var(--tag-text);
    transition: all 0.2s ease;
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 3px solid var(--project-accent);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.project-card h3 {
    font-size: 0.95rem;
    color: var(--project-accent);
    margin-bottom: 0.4rem;
    font-family: 'Space Mono', monospace;
}

.project-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent);
    text-decoration: none;
    margin-top: 0.6rem;
    transition: color 0.2s ease;
}

.project-link:hover { color: var(--accent-hover); }
.project-link .arrow { transition: transform 0.2s ease; }
.project-link:hover .arrow { transform: translateX(3px); }

.now-playing {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.now-playing-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-faint);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.np-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

.now-playing img {
    border-radius: 8px;
    border: 1px solid var(--border);
    max-width: 350px;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.now-playing a:hover img { transform: scale(1.02); }
.now-playing .np-credit {
    font-size: 0.65rem;
    color: var(--text-faint);
    margin-top: 0.75rem;
}

.contact {
    text-align: center;
    padding-top: 2rem;
}

.contact-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.contact-note {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 0.75rem;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-faint);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--accent); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

::selection {
    background: var(--accent);
    color: var(--bg);
}

html { scroll-behavior: smooth; }

/* ============================================================
   EASTER EGG: CAT / NEKO
   ============================================================ */
.easter-cat {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Walking cat using CSS pixel art */
.easter-cat::before {
    content: '';
    display: block;
    width: 1.2em;
    height: 1em;
    background:
        /* ears */
        linear-gradient(135deg, #555 25%, transparent 25%) no-repeat 0.05em 0 / 0.25em 0.3em,
        linear-gradient(225deg, #555 25%, transparent 25%) no-repeat 0.9em 0 / 0.25em 0.3em,
        /* head */
        radial-gradient(circle at 50% 50%, #666 40%, transparent 41%) no-repeat 50% 0.35em / 0.9em 0.7em,
        /* eyes */
        radial-gradient(circle, #0f0 2px, transparent 3px) no-repeat 0.35em 0.35em / 0.15em 0.15em,
        radial-gradient(circle, #0f0 2px, transparent 3px) no-repeat 0.72em 0.35em / 0.15em 0.15em,
        /* body */
        radial-gradient(ellipse at 50% 40%, #666 45%, transparent 46%) no-repeat 50% 0.8em / 0.8em 0.6em,
        /* tail */
        linear-gradient(45deg, transparent 40%, #555 40%, #555 60%, transparent 60%) no-repeat 0.9em 0.6em / 0.5em 0.4em;
    animation: catBounce 0.3s ease-in-out infinite alternate;
}

@keyframes catBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

@keyframes catWalkRight {
    from { left: -60px; }
    to { left: calc(100vw + 60px); }
}

@keyframes catWalkLeft {
    from { right: -60px; }
    to { right: calc(100vw + 60px); }
}

/* ============================================================
   EASTER EGG: GFUNK PLAYER
   ============================================================ */
.gfunk-player {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    width: 240px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
    font-family: 'Space Mono', monospace;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gfunk-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.gfunk-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ff6ec7;
    letter-spacing: 0.1em;
}

.gfunk-sub {
    font-size: 0.6rem;
    color: #666;
}

.gfunk-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gfunk-play, .gfunk-close {
    background: none;
    border: 1px solid #444;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #ccc;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.gfunk-play:hover, .gfunk-close:hover {
    border-color: #ff6ec7;
    color: #ff6ec7;
}

.gfunk-visualizer {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 24px;
}

.gfunk-bar {
    flex: 1;
    background: #ff6ec7;
    border-radius: 1px;
    min-height: 2px;
    animation: vizPulse 0.5s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.gfunk-bar:nth-child(1)  { animation-delay: 0.00s; }
.gfunk-bar:nth-child(2)  { animation-delay: 0.05s; }
.gfunk-bar:nth-child(3)  { animation-delay: 0.10s; }
.gfunk-bar:nth-child(4)  { animation-delay: 0.15s; }
.gfunk-bar:nth-child(5)  { animation-delay: 0.20s; }
.gfunk-bar:nth-child(6)  { animation-delay: 0.25s; }
.gfunk-bar:nth-child(7)  { animation-delay: 0.30s; }
.gfunk-bar:nth-child(8)  { animation-delay: 0.35s; }
.gfunk-bar:nth-child(9)  { animation-delay: 0.40s; }
.gfunk-bar:nth-child(10) { animation-delay: 0.45s; }
.gfunk-bar:nth-child(11) { animation-delay: 0.50s; }
.gfunk-bar:nth-child(12) { animation-delay: 0.55s; }
.gfunk-bar:nth-child(13) { animation-delay: 0.60s; }
.gfunk-bar:nth-child(14) { animation-delay: 0.65s; }
.gfunk-bar:nth-child(15) { animation-delay: 0.70s; }
.gfunk-bar:nth-child(16) { animation-delay: 0.75s; }

@keyframes vizPulse {
    from { height: 3px; }
    to { height: 22px; }
}

@media (max-width: 640px) {
    .wrapper { padding: 2rem 1rem 3rem; }
    h1 { font-size: 1.75rem; }
    nav { gap: 0.4rem 1rem; }
    .service-item { padding: 0.85rem 1rem; }
    .project-card { padding: 1rem 1.25rem; }
    .theme-toggle { top: 1rem; right: 1rem; width: 38px; height: 38px; }
}
