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

:root {
    --cream: #f2f0eb;
    --cream-2: #e8e5dc;
    --cream-3: #dedad0;
    --ink: #0c1824;
    --ink-2: #1a2e42;
    --muted: #4a5e72;
    --accent: #1848b8;
    --accent-2: #b83818;
    --accent-glow: rgba(24, 72, 184, 0.12);
    --line: rgba(10, 22, 40, 0.09);
    --line-strong: rgba(10, 22, 40, 0.16);
    --terminal-bg: #f7f5f1;
    --card-hover-shadow: 0 24px 64px rgba(24, 72, 184, 0.1), 0 4px 16px rgba(10, 22, 40, 0.06);
}

[data-theme="dark"] {
    --cream: #070c16;
    --cream-2: #0c1422;
    --cream-3: #111d2e;
    --ink: #e0eaf8;
    --ink-2: #afc5e0;
    --muted: #6a8aaa;
    --accent: #4d8fe8;
    --accent-2: #e8704d;
    --accent-glow: rgba(77, 143, 232, 0.1);
    --line: rgba(200, 220, 248, 0.07);
    --line-strong: rgba(200, 220, 248, 0.13);
    --terminal-bg: #080e1a;
    --card-hover-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(77, 143, 232, 0.08);
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: "JetBrains Mono", monospace;
    background: var(--cream);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
    transition: background 0.5s ease, color 0.5s ease;
}

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

/* Touch devices */
@media (pointer: coarse) {
    body { cursor: auto; }
    .cursor, .cursor-ring, #inkCanvas { display: none !important; }
}

/* ── Custom Cursor ── */
.cursor {
    position: fixed;
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, background 0.3s ease;
    opacity: 0;
}

.cursor-ring {
    position: fixed;
    width: 30px; height: 30px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.cursor.active { opacity: 1; }
.cursor-ring.active { opacity: 0.32; }
.cursor.expanded { width: 11px; height: 11px; background: var(--accent-2); }
.cursor-ring.expanded { width: 44px; height: 44px; opacity: 0.18; border-color: var(--accent-2); }

/* ── Ink canvas ── */
#inkCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9997;
}

/* ── Scroll progress ── */
#scrollProgress {
    position: fixed;
    top: 0; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9990;
    transition: width 0.05s linear;
}

/* ══════════════════════
   NAV
══════════════════════ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1.8rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: backdrop-filter 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

nav.scrolled {
    backdrop-filter: blur(16px) saturate(180%);
    background: rgba(242, 240, 235, 0.9);
    box-shadow: 0 1px 0 var(--line);
}
[data-theme="dark"] nav.scrolled {
    background: rgba(7, 12, 22, 0.92);
}

.nav-logo {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--ink); }

/* ── Theme Toggle ── */
.theme-toggle {
    position: relative;
    width: 44px; height: 24px;
    flex-shrink: 0;
    cursor: none;
}

.theme-toggle input {
    opacity: 0; width: 0; height: 0;
    position: absolute;
}

.toggle-track {
    position: absolute; inset: 0;
    border: 1px solid var(--muted);
    border-radius: 100px;
    transition: border-color 0.4s ease, background 0.4s ease;
    overflow: hidden;
}

.toggle-track::before {
    content: "";
    position: absolute; inset: 0;
    background: var(--ink);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.theme-toggle input:checked + .toggle-track::before { opacity: 1; }

.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease;
}

.theme-toggle input:checked ~ .toggle-thumb {
    transform: translateX(20px);
    background: var(--cream);
}

.toggle-icons {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    pointer-events: none;
}

.toggle-icons svg { width: 9px; height: 9px; opacity: 0.5; transition: opacity 0.3s ease; }
.icon-sun { color: #1d1d1d; }
.icon-moon { color: var(--ink); }
[data-theme="dark"] .icon-sun,
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun,
[data-theme="light"] .icon-moon { opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 2.5rem; }

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px; height: 38px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: none; padding: 0;
    transition: border-color 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}
.hamburger:hover { border-color: var(--muted); background: rgba(74, 94, 114, 0.06); }
.hamburger span {
    display: block; height: 1px;
    background: var(--muted);
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), opacity 0.25s ease, width 0.3s ease, background 0.3s ease;
    transform-origin: center;
    border-radius: 2px;
}
.hamburger span:nth-child(1) { width: 16px; }
.hamburger span:nth-child(2) { width: 12px; }
.hamburger span:nth-child(3) { width: 16px; }
.hamburger:hover span { background: var(--ink); }
.hamburger:hover span:nth-child(2) { width: 16px; }
.hamburger.open { border-color: var(--ink); }
.hamburger.open span { width: 14px; background: var(--ink); }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Nav ── */
.mobile-nav {
    display: flex; position: fixed; inset: 0;
    background: var(--cream);
    z-index: 90;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-nav.open { opacity: 1; visibility: visible; pointer-events: all; }
.mobile-nav ul { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 2.5rem; }
.mobile-nav a {
    font-size: 1.8rem; font-weight: 300;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); text-decoration: none;
    transition: color 0.3s ease;
}
.mobile-nav a:hover { color: var(--ink); }

/* ══════════════════════
   HERO
══════════════════════ */
.eyebrow-static { color: var(--accent); opacity: 0.55; }

.hero-eyebrow .t-cursor {
    color: var(--accent);
    font-size: 1.1em;
    animation: blink 1s step-end infinite;
    margin-left: 1px;
}

#heroName {
    white-space: pre;
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

#heroName em {
    font-style: italic;
    color: var(--muted);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 300;
    letter-spacing: 0.01em;
}

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

/* Terminal typing */
.t-line {
    font-size: 0.7rem;
    line-height: 1.75;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.t-line.typed { opacity: 1; transform: translateY(0); }
.t-line.typing::after {
    content: "█";
    color: var(--accent);
    animation: blink 0.7s step-end infinite;
    font-size: 0.8em; margin-left: 1px;
}

/* Status bar */
.t-status-bar {
    margin-top: 0.6rem; padding-top: 0.5rem;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.65rem;
}
.t-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ec94e;
    flex-shrink: 0;
    animation: pulse-dot 2.2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(78,201,78,0.5);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}
.t-status-label {
    transition: opacity 0.25s ease;
    color: var(--muted);
    font-size: 0.57rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.t-status-val {
    transition: opacity 0.25s ease;
    color: #4ec94e;
    margin-left: auto; font-size: 0.6rem;
}
#typedRole { color: var(--ink); }

/* ── Hero layout ── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

/* Large ghost letterform in background */
.hero::after {
    content: "aayu";
    position: absolute;
    bottom: -0.12em; left: -0.04em;
    font-size: clamp(12rem, 22vw, 22rem);
    font-weight: 300;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    line-height: 1;
    pointer-events: none; z-index: 0;
    user-select: none;
    letter-spacing: -0.03em;
    opacity: 0.45;
}

/* Radial glow on right side */
.hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 60%; height: 100%;
    background: radial-gradient(ellipse at 80% 40%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none; z-index: 0;
}

.hero-left, .hero-right { position: relative; z-index: 1; }

.hero-left {
    display: flex; flex-direction: column;
    justify-content: flex-end;
    padding: 8rem 4rem 6rem;
    border-right: 1px solid var(--line);
}

.hero-eyebrow {
    font-size: 0.63rem;
    letter-spacing: 0.22em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1.8rem;
    animation: heroFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.hero-name {
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.025em;
    margin-bottom: 2.5rem;
}

.hero-desc {
    font-size: 0.8rem; font-weight: 300;
    line-height: 1.85;
    color: var(--muted);
    max-width: 34ch;
    margin-top: 2rem;
    animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.6s both;
}

.hero-right {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 8rem 4rem 6rem;
    gap: 2.5rem;
}

.hero-scroll {
    font-size: 0.58rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--muted);
    display: flex; align-items: center; gap: 0.8rem;
}
.hero-scroll::before {
    content: "";
    width: 36px; height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
    transform-origin: left; transform: scaleX(0);
    animation: lineGrow 0.8s ease 1.3s forwards;
}

/* ── Terminal ── */
.hero-terminal {
    width: min(330px, 90%);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.7) inset,
        0 24px 56px rgba(10,22,40,0.13),
        0 6px 16px rgba(10,22,40,0.07);
    transition: box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1);
    animation: heroFadeUp 1s cubic-bezier(0.16,1,0.3,1) 0.5s both;
}
.hero-terminal:hover {
    box-shadow:
        0 1px 0 rgba(255,255,255,0.7) inset,
        0 36px 80px rgba(24,72,184,0.15),
        0 10px 28px rgba(10,22,40,0.1);
    transform: translateY(-4px) rotate(-0.35deg);
}
[data-theme="dark"] .hero-terminal {
    box-shadow:
        0 1px 0 rgba(77,143,232,0.07) inset,
        0 24px 56px rgba(0,0,0,0.55),
        0 6px 16px rgba(0,0,0,0.3);
}
[data-theme="dark"] .hero-terminal:hover {
    box-shadow:
        0 1px 0 rgba(77,143,232,0.1) inset,
        0 36px 80px rgba(0,0,0,0.7),
        0 0 52px rgba(77,143,232,0.1);
    transform: translateY(-4px) rotate(-0.35deg);
}

.terminal-bar {
    background: var(--cream-2);
    padding: 0.6rem 1rem;
    display: flex; align-items: center; gap: 0.45rem;
    border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .terminal-bar { background: #0d1826; }

.t-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; transition: filter 0.2s ease; }
.hero-terminal:hover .t-dot { filter: brightness(1.15); }
.t-red    { background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(255,95,87,0.35); }
.t-yellow { background: #febc2e; box-shadow: 0 0 0 0.5px rgba(254,188,46,0.35); }
.t-green  { background: #28c840; box-shadow: 0 0 0 0.5px rgba(40,200,64,0.35); }

.t-title {
    margin-left: auto;
    font-size: 0.52rem; letter-spacing: 0.14em;
    color: var(--muted); text-transform: uppercase;
}

.terminal-body {
    padding: 1.1rem 1.3rem 1rem;
    background: var(--terminal-bg);
    display: flex; flex-direction: column; gap: 0.03rem;
    transition: background 0.5s ease;
}

/* overrides the earlier t-line opacity:0 rule for inside terminal */
.t-line {
    font-size: 0.7rem;
    line-height: 1.75;
    white-space: nowrap;
    overflow: hidden;
}

.t-indent { padding-left: 1.4em; }
.t-gap    { margin-top: 0.45rem; }

.t-output {
    margin-top: 0.4rem; padding-top: 0.5rem;
    border-top: 1px solid var(--line);
    color: var(--accent); font-size: 0.7rem;
}

/* Syntax colours */
.t-kw      { color: #b06fd8; }
.t-var     { color: var(--ink); font-weight: 400; }
.t-op      { color: var(--muted); }
.t-bracket { color: var(--muted); }
.t-key     { color: #d45f6a; }
.t-str     { color: #5aad6a; }
.t-bool    { color: #d0923a; }
.t-fn      { color: #4a9fdf; }
.t-comment { color: var(--muted); font-style: italic; opacity: 0.55; }
.t-prompt  { color: var(--muted); margin-right: 0.4em; }

[data-theme="dark"] .t-kw  { color: #c678dd; }
[data-theme="dark"] .t-key { color: #e06c75; }
[data-theme="dark"] .t-str { color: #98c379; }
[data-theme="dark"] .t-fn  { color: #61afef; }

.t-cursor {
    display: inline-block; color: var(--accent);
    margin-left: 2px; font-size: 0.8em; vertical-align: baseline;
}
@media (prefers-reduced-motion: no-preference) {
    .t-cursor { animation: blink 1s step-end infinite; }
}

/* ══════════════════════
   SECTIONS
══════════════════════ */
section { padding: 6rem 4rem; }

.section-label {
    font-size: 0.58rem; letter-spacing: 0.24em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 4rem;
    display: flex; align-items: center; gap: 1.5rem;
}
.section-label::before {
    content: "";
    width: 40px; height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
    transform-origin: left; transform: scaleX(0);
    transition: transform 0.7s cubic-bezier(0.16,1,0.3,1) 0.2s;
}
.section-label.visible::before { transform: scaleX(1); }

/* ══════════════════════
   ABOUT
══════════════════════ */
.about {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 6rem;
    border-top: 1px solid var(--line);
}
.about-left { padding-top: 0.5rem; }

.about-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 300; line-height: 1.2;
    margin-bottom: 2.5rem; margin-top: 2.5rem;
}
.about-title em {
    font-style: italic; color: var(--muted);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 300;
}

.about-body {
    font-size: 0.8rem; font-weight: 300;
    line-height: 1.95; color: var(--muted);
    margin-top: 2rem;
}

.about-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem; padding-top: 3rem;
    border-top: 1px solid var(--line);
}

.stat-num {
    font-size: 3rem; font-weight: 300; line-height: 1;
    margin-bottom: 0.6rem;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--ink) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-num[data-count] { display: inline-block; }

.stat-label {
    font-size: 0.58rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--muted);
}

/* ══════════════════════
   SKILLS
══════════════════════ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.skill-item {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 2.5rem 2rem;
    position: relative; overflow: hidden;
    cursor: default;
}

/* Ink-fill from bottom */
.skill-item::before {
    content: "";
    position: absolute; inset: 0;
    background: var(--ink);
    transform: scaleY(0); transform-origin: bottom;
    transition: transform 0.55s cubic-bezier(0.16,1,0.3,1);
    z-index: 0;
}
.skill-item:hover::before { transform: scaleY(1); }

/* Accent pip top-right */
.skill-item::after {
    content: "";
    position: absolute; top: 1.2rem; right: 1.2rem;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    opacity: 0; transform: scale(0);
    transition: opacity 0.3s ease 0.12s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1) 0.12s;
    z-index: 2;
}
.skill-item:hover::after { opacity: 1; transform: scale(1); }

.skill-item:hover .skill-name,
.skill-item:hover .skill-cat,
.skill-item:hover .skill-icon { color: var(--cream); opacity: 1; }

.skill-icon {
    font-size: 2.2rem; margin-bottom: 1.2rem;
    opacity: 0.65;
    position: relative; z-index: 1; display: block;
    transition: color 0.4s ease, opacity 0.4s ease, transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.skill-item:hover .skill-icon { transform: scale(1.1) translateY(-2px); }

.skill-cat {
    font-size: 0.52rem; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 0.9rem;
    position: relative; z-index: 1;
    transition: color 0.4s ease;
}

.skill-name {
    font-size: 1.2rem; font-weight: 300; line-height: 1.4;
    position: relative; z-index: 1;
    transition: color 0.4s ease;
}

/* ══════════════════════
   PROJECTS
══════════════════════ */
.projects { border-top: 1px solid var(--line); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem; margin-top: 1.5rem;
}

.project-card {
    border: 1px solid var(--line);
    padding: 2.2rem; border-radius: 10px;
    background: transparent;
    position: relative; overflow: hidden;
    transition:
        transform 0.45s cubic-bezier(0.16,1,0.3,1),
        border-color 0.3s ease,
        box-shadow 0.45s ease;
}

/* Gradient top-bar */
.project-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}

/* Background tint */
.project-card::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.project-card:hover::before { transform: scaleX(1); }
.project-card:hover::after  { opacity: 1; }
.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(24,72,184,0.22);
    box-shadow: var(--card-hover-shadow);
}
[data-theme="dark"] .project-card:hover { border-color: rgba(77,143,232,0.2); }

.project-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1rem;
}

.project-num {
    font-size: 0.52rem; letter-spacing: 0.18em;
    color: var(--accent); opacity: 0.55;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.55rem; display: block;
    position: relative; z-index: 1;
}

.project-title {
    font-size: 1.05rem; font-weight: 400;
    color: var(--ink);
    position: relative; z-index: 1;
    transition: color 0.3s ease;
}
.project-card:hover .project-title { color: var(--accent); }

.project-link {
    color: var(--muted); text-decoration: none;
    font-size: 1.1rem;
    position: relative; z-index: 1; flex-shrink: 0; margin-top: 0.2rem;
    transition: color 0.3s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.project-link:hover { color: var(--accent); transform: translate(3px, -3px); }

.project-desc {
    font-size: 0.77rem; line-height: 1.75;
    color: var(--muted); margin-bottom: 1.5rem;
    position: relative; z-index: 1;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; position: relative; z-index: 1; }

.tag {
    font-size: 0.57rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent);
    border: 1px solid var(--line);
    padding: 0.22rem 0.55rem; border-radius: 3px;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.project-card:hover .tag {
    border-color: rgba(24,72,184,0.2);
    background: rgba(24,72,184,0.04);
}

/* ══════════════════════
   CONTACT
══════════════════════ */
.contact {
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 9rem 4rem;
    position: relative; overflow: hidden;
}

/* Ghost watermark */
.contact::after {
    content: "hello.";
    position: absolute;
    bottom: -0.18em; left: 50%;
    transform: translateX(-50%);
    font-size: clamp(8rem, 18vw, 18rem);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic; font-weight: 300;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    white-space: nowrap;
    pointer-events: none; user-select: none;
    opacity: 0.4; z-index: 0;
}

/* Gradient top accent */
.contact::before {
    content: "";
    position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.contact-tagline {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300; line-height: 1.2;
    margin-bottom: 3.5rem;
    position: relative; z-index: 1;
}
.contact-tagline em {
    font-style: italic; color: var(--muted);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 300;
}

.contact-links { position: relative; z-index: 1; }

.contact-link {
    display: inline-flex; align-items: center; gap: 0.4em;
    font-size: 0.73rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink); text-decoration: none;
    border-bottom: 1px solid var(--line-strong); padding-bottom: 0.3rem;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.35s cubic-bezier(0.16,1,0.3,1);
    margin: 0 1.2rem;
}
.contact-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.contact-icon { width: 1em; height: 1em; flex-shrink: 0; }

/* ── FOOTER ── */
footer {
    padding: 2rem 4rem; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
}
footer p { font-size: 0.58rem; letter-spacing: 0.14em; color: var(--muted); }

/* ══════════════════════
   ANIMATIONS
══════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Reveal ── */
.reveal { transition: opacity 0.9s ease, transform 0.9s ease; }

@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(28px); }
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Page load ── */
@media (prefers-reduced-motion: no-preference) {
    body:not(.loaded) nav,
    body:not(.loaded) .hero,
    body:not(.loaded) section,
    body:not(.loaded) footer { opacity: 0; }

    body.loaded nav     { animation: fadeUp 0.7s ease 0.1s  forwards; }
    body.loaded .hero   { animation: fadeUp 0.9s ease 0.25s forwards; }
    body.loaded section { animation: fadeUp 0.9s ease 0.45s forwards; }
    body.loaded footer  { animation: fadeUp 0.7s ease 0.55s forwards; }
}

/* ══════════════════════
   RESPONSIVE
══════════════════════ */
@media (max-width: 900px) {
    nav { padding: 1.4rem 2rem; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-right { gap: 1.5rem; }

    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero::after { font-size: clamp(7rem, 28vw, 12rem); bottom: auto; top: 0; opacity: 0.25; }
    .hero-left { padding: 7rem 2rem 3rem; border-right: none; border-bottom: 1px solid var(--line); }
    .hero-right { padding: 3rem 2rem; min-height: 280px; }
    .hero-terminal { width: 100%; }

    section { padding: 5rem 2rem; }
    .about { grid-template-columns: 1fr; gap: 2rem; }
    .about-stats { grid-template-columns: repeat(3, 1fr); }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .contact { padding: 6rem 2rem; }
    .contact::after { font-size: clamp(5rem, 22vw, 10rem); }
    footer { flex-direction: column; gap: 0.5rem; text-align: center; padding: 2rem; }
}

@media (max-width: 1100px) and (min-width: 901px) {
    .hero-left { padding: 7rem 2.5rem 4rem; }
    .hero-right { padding: 7rem 2rem 4rem; }
    .hero-terminal { width: min(280px, 100%); }
    .t-line { font-size: 0.65rem; }
}

@media (min-width: 1400px) {
    :root { font-size: 18px; }
    nav { padding: 2.2rem 6rem; }
    .nav-logo { font-size: 0.78rem; }
    .nav-links a { font-size: 0.72rem; }
    section { padding: 7rem 6rem; }
    .hero-left  { padding: 10rem 6rem 8rem; }
    .hero-right { padding: 10rem 6rem 8rem; }
    .hero-name  { font-size: clamp(5rem, 8vw, 9rem); }
    .hero-desc  { font-size: 0.86rem; max-width: 38ch; }
    .about-title { font-size: clamp(2.5rem, 4vw, 4.5rem); }
    .about-body  { font-size: 0.86rem; }
    .stat-num    { font-size: 3.5rem; }
    .skill-item  { padding: 3.5rem 2.5rem; }
    .skill-name  { font-size: 1.4rem; }
    .contact     { padding: 10rem 6rem; }
    .contact-tagline { font-size: clamp(3.5rem, 6vw, 6rem); }
    .contact-link    { font-size: 0.88rem; margin: 0 1.5rem; }
    footer { padding: 2.5rem 6rem; }
}

@media (min-width: 1800px) {
    :root { font-size: 20px; }
    nav { padding: 2.5rem 8rem; }
    section { padding: 9rem 8rem; }
    .hero-left  { padding: 12rem 8rem 10rem; }
    .hero-right { padding: 12rem 8rem 10rem; }
    .hero-name  { font-size: clamp(6rem, 9vw, 11rem); }
    .hero-desc  { font-size: 0.9rem; }
    .about-body { font-size: 0.9rem; }
    .skill-item { padding: 4rem 3rem; }
    .skill-name { font-size: 1.65rem; }
    footer { padding: 3rem 8rem; }
}
