:root {
    --color-bg: #faf8f5;
    --color-text: #1a1a1a;
    --color-accent: #c17a5a;
    --color-secondary: #7a8e7e;
    --color-light: #f0ede8;
    --color-border: rgba(26, 26, 26, 0.1);

    --font-display: 'Playwrite NZ', cursive;
    --font-mono: 'IBM Plex Mono', monospace;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 5.5rem;

    --transition-speed: 0.3s;
}

body.dark-mode {
    --color-bg: #111111;
    --color-text: #ede9e3;
    --color-accent: #d89077;
    --color-secondary: #8fa092;
    --color-light: #1a1a1a;
    --color-border: rgba(237, 233, 227, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

*,
*::before,
*::after {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
}

*:focus,
*:active,
*:focus-visible,
*:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

::-moz-focus-inner { border: 0 !important; }
:focus-visible { outline: none !important; box-shadow: none !important; }

button, a, input, textarea, select, [tabindex] {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

*::selection { background: rgba(193, 122, 90, 0.2); color: inherit; }
*::-moz-selection { background: rgba(193, 122, 90, 0.2); color: inherit; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
    background-color: #faf8f5;
}

body.dark-mode html,
html:has(body.dark-mode) {
    background-color: #111111;
}

body {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

body.dark-mode {
    background-color: #111111;
}

body.dark-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    background: #111111;
    z-index: -1;
    pointer-events: none;
}

.floating-shapes {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    will-change: transform;
    animation: float 20s infinite ease-in-out;
    transition: opacity var(--transition-speed) ease;
    pointer-events: none;
}

body.dark-mode .shape { opacity: 0.04; }

.shape-1 {
    width: 300px; height: 300px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    top: 10%; left: 10%;
    animation-delay: 0s; animation-duration: 25s;
}

.shape-2 {
    width: 200px; height: 200px;
    background: linear-gradient(225deg, var(--color-secondary), var(--color-accent));
    border-radius: 48% 52% 68% 32% / 42% 28% 72% 58%;
    top: 60%; right: 15%;
    animation-delay: -5s; animation-duration: 30s;
}

.shape-3 {
    width: 250px; height: 250px;
    background: linear-gradient(315deg, var(--color-accent), var(--color-light));
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    bottom: 15%; left: 15%;
    animation-delay: -10s; animation-duration: 28s;
}

.shape-4 {
    width: 180px; height: 180px;
    background: linear-gradient(45deg, var(--color-secondary), var(--color-light));
    border-radius: 73% 27% 26% 74% / 55% 71% 29% 45%;
    top: 40%; right: 25%;
    animation-delay: -15s; animation-duration: 22s;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    33% { transform: translate3d(20px, -30px, 0) rotate(120deg); }
    66% { transform: translate3d(-15px, 20px, 0) rotate(240deg); }
}

nav, section, footer { position: relative; z-index: 1; }

.grain-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9998;
}

body.dark-mode .grain-overlay { opacity: 0.04; }

.decorative-dots {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.dot {
    position: absolute;
    width: 4px; height: 4px;
    background-color: var(--color-accent);
    border-radius: 50%;
    opacity: 0.2;
    will-change: transform, opacity;
    animation: pulse 4s ease-in-out infinite;
    transition: background-color var(--transition-speed) ease;
    pointer-events: none;
}

.dot:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.dot:nth-child(2) { top: 35%; right: 20%; animation-delay: 0.7s; }
.dot:nth-child(3) { top: 50%; left: 25%; animation-delay: 1.4s; }
.dot:nth-child(4) { top: 65%; right: 15%; animation-delay: 2.1s; }
.dot:nth-child(5) { top: 80%; left: 30%; animation-delay: 2.8s; }
.dot:nth-child(6) { top: 45%; left: 45%; animation-delay: 3.5s; }

@keyframes pulse {
    0%, 100% { transform: scale(1) translate3d(0, 0, 0); opacity: 0.2; }
    50% { transform: scale(1.3) translate3d(0, 0, 0); opacity: 0.45; }
}

/* ─── NAV ── */
.main-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(180deg, var(--color-bg) 0%, transparent 100%);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-speed) ease;
}

body.dark-mode .main-nav {
    background: linear-gradient(180deg, #111111 0%, transparent 100%);
}

.main-nav.scrolled {
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

body.dark-mode .main-nav.scrolled {
    background: rgba(17, 17, 17, 0.96);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

@media (min-width: 769px) {
    .logo:hover { transform: scale(1.1) rotate(-5deg); color: var(--color-accent); }
}

.dark-mode-toggle {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@media (min-width: 769px) {
    .dark-mode-toggle:hover {
        transform: scale(1.15) rotate(180deg);
        border-color: var(--color-accent);
        box-shadow: 0 4px 16px rgba(193, 122, 90, 0.3);
    }
}

.dark-mode-toggle .sun-icon,
.dark-mode-toggle .moon-icon {
    position: absolute;
    width: 20px; height: 20px;
    stroke: var(--color-text);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dark-mode-toggle .sun-icon { opacity: 1; transform: rotate(0deg) scale(1); }
.dark-mode-toggle .moon-icon { opacity: 0; transform: rotate(180deg) scale(0); }
body.dark-mode .dark-mode-toggle .sun-icon { opacity: 0; transform: rotate(-180deg) scale(0); }
body.dark-mode .dark-mode-toggle .moon-icon { opacity: 1; transform: rotate(0deg) scale(1); }

.dark-mode-toggle.desktop-only { display: flex; }
.dark-mode-toggle.mobile-only { display: none; }

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 35px; height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
    position: relative;
}

.burger-line {
    width: 100%; height: 4px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: block;
}

.burger-menu.active .burger-line:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); background-color: var(--color-accent); }
.burger-menu.active .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-menu.active .burger-line:nth-child(3) { transform: rotate(-45deg) translate(8px, -8px); background-color: var(--color-accent); }

.nav-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 998;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    transition: width 0.3s ease;
}

@media (min-width: 769px) {
    .nav-links a:hover { color: var(--color-accent); }
    .nav-links a:hover::after { width: 100%; }
}

/* ─── SCROLL INDICATOR ── */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-secondary);
    opacity: 0;
    animation: fadeInBounce 1.5s ease forwards;
    animation-delay: 1.2s;
    pointer-events: none;
    z-index: 10;
}

.mouse-icon {
    width: 28px; height: 42px;
    border: 2px solid var(--color-accent);
    border-radius: 14px;
    position: relative;
    margin-bottom: 6px;
    animation: mouseBounce 2s ease-in-out infinite;
}

@keyframes mouseBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.mouse-wheel {
    width: 4px; height: 10px;
    background-color: var(--color-accent);
    border-radius: 2px;
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    animation: mouseWheel 2s ease-in-out infinite;
}

@keyframes mouseWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(14px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeInBounce {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    60% { opacity: 1; transform: translateX(-50%) translateY(5px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.scroll-line {
    width: 1px; height: 60px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── SECTIONS ── */
section {
    padding: var(--spacing-xl) var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto var(--spacing-lg);
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 1px; height: 100px;
    background: linear-gradient(to bottom, transparent, var(--color-border), transparent);
    transform: translateX(-50%);
    opacity: 0.5;
}
section:first-of-type::before { display: none; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 0;
    width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.section-title.revealed { animation: revealText 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards; }
.section-title.revealed::after { transform: scaleX(1); transition-delay: 0.3s; }

/* ─── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero-content { max-width: 1400px; width: 100%; position: relative; z-index: 2; }
.hero-layout { display: flex; flex-direction: column; }

.hero-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.3s forwards;
}

.hero-name-block {
    position: relative;
    padding-bottom: 2.5rem;
    margin-bottom: 2.75rem;
}

.hero-name-block::after {
    content: '';
    position: absolute;
    bottom: -18px; left: 0;
    height: 4px; width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-secondary) 55%, transparent 100%);
    animation: heroLineGrow 1s cubic-bezier(0.77, 0, 0.175, 1) 0.85s forwards;
}

@keyframes heroLineGrow { to { width: 100%; } }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10.5vw, 9rem);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.03em;
}

.title-line { display: block; opacity: 0; transform: translateY(40px); }
.title-line.revealed { animation: revealText 1s cubic-bezier(0.77, 0, 0.175, 1) forwards; }

.hero-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 1.05s forwards;
}

body.mobile-nav-jump .about-section,
body.mobile-nav-jump .projects-section,
body.mobile-nav-jump .quote-section,
body.mobile-nav-jump .contact-section {
    transition: none !important;
}

.hero-info-left { display: flex; flex-direction: column; gap: 0.55rem; }

.hero-role { font-size: 17px; color: var(--color-text); letter-spacing: 0.005em; }

.hero-desc {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-secondary);
    max-width: 380px;
    line-height: 1.7;
}

.hero-info-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    flex-shrink: 0;
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
}

.hero-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-secondary);
    flex-shrink: 0;
    animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.7); }
}

.hero-meta-item {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-secondary);
    opacity: 0.45;
}

/* ─── LOADING SCREEN ── */
.loader-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--color-bg);
}

body.dark-mode .loader-screen { background: #111111; }

.loader-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 40%, rgba(193,122,90,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 60%, rgba(122,142,126,0.05) 0%, transparent 70%);
}

body.dark-mode .loader-bg {
    background:
        radial-gradient(ellipse 60% 50% at 30% 40%, rgba(216,144,119,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 60%, rgba(143,160,146,0.05) 0%, transparent 70%);
}

.loader-corner {
    position: absolute;
    width: 28px; height: 28px;
    border-color: var(--color-accent);
    border-style: solid;
    opacity: 0;
    animation: loaderCornerFade 0.5s ease forwards;
}
.loader-corner--tl { top: 32px; left: 32px; border-width: 1.5px 0 0 1.5px; animation-delay: 0.1s; }
.loader-corner--tr { top: 32px; right: 32px; border-width: 1.5px 1.5px 0 0; animation-delay: 0.15s; }
.loader-corner--bl { bottom: 32px; left: 32px; border-width: 0 0 1.5px 1.5px; animation-delay: 0.2s; }
.loader-corner--br { bottom: 32px; right: 32px; border-width: 0 1.5px 1.5px 0; animation-delay: 0.25s; }
@keyframes loaderCornerFade { to { opacity: 0.45; } }

.loader-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.loader-monogram-wrap {
    position: relative;
    width: 110px; height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
    opacity: 0;
    animation: loaderFadeIn 0.6s ease 0.2s forwards;
}

.loader-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-ring-track { stroke: var(--color-border); }
.loader-ring-fill {
    stroke: var(--color-accent);
    stroke-linecap: round;
    stroke-dasharray: 376.99;
    stroke-dashoffset: 376.99;
    animation: loaderRingFill 2s cubic-bezier(0.4,0,0.2,1) 0.3s forwards;
}
@keyframes loaderRingFill { 0% { stroke-dashoffset: 376.99; } 100% { stroke-dashoffset: 0; } }

.loader-monogram {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: loaderFadeIn 0.5s ease 0.55s forwards;
}

.loader-name {
    display: flex;
    gap: 0.5em;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.loader-name-first, .loader-name-last { display: inline-block; opacity: 0; transform: translateY(24px); }
.loader-name-first { animation: loaderNameReveal 0.7s cubic-bezier(0.22,1,0.36,1) 0.6s forwards; }
.loader-name-last  { animation: loaderNameReveal 0.7s cubic-bezier(0.22,1,0.36,1) 0.78s forwards; }
@keyframes loaderNameReveal { to { opacity: 1; transform: translateY(0); } }

.loader-line {
    width: clamp(40px, 8vw, 60px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0;
    animation: loaderFadeIn 0.5s ease 1s forwards;
    margin-bottom: 1rem;
}

.loader-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 2vw, 0.78rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 2.2rem;
    opacity: 0;
    animation: loaderFadeIn 0.6s ease 1.05s forwards;
}

.loader-bar-wrap {
    width: clamp(140px, 30vw, 220px);
    height: 1.5px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    animation: loaderFadeIn 0.4s ease 0.9s forwards;
}

.loader-bar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    border-radius: 2px;
    animation: loaderBarGrow 1.95s cubic-bezier(0.4,0,0.2,1) 0.3s forwards;
}
@keyframes loaderBarGrow { 0% { width: 0%; } 60% { width: 68%; } 100% { width: 100%; } }

.loader-bottom {
    position: absolute;
    bottom: 48px; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-secondary);
    opacity: 0;
    animation: loaderFadeIn 0.5s ease 0.3s forwards;
}

.loader-status { display: flex; align-items: center; gap: 8px; }
.loader-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: loaderDotPulse 1.2s ease-in-out infinite;
}
@keyframes loaderDotPulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
@keyframes loaderFadeIn { to { opacity: 1; } }
.loader-exit { animation: loaderExit 0.85s cubic-bezier(0.77,0,0.175,1) forwards !important; pointer-events: none; }
@keyframes loaderExit { 0% { opacity:1; } 100% { opacity:0; } }

/* ─── ABOUT ── */
.about-section {
    background: transparent;
    position: relative;
}

body.dark-mode .about-section { background: transparent; }

.about-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 0;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-secondary));
    animation: borderGrow 2s ease-out forwards;
    animation-delay: 0.5s;
}
@keyframes borderGrow { to { height: 100%; } }

.about-content { max-width: 1100px; margin: 0 auto; }

.about-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.about-text-block { opacity: 0; transform: translateY(20px); }
.about-text-block.revealed { animation: fadeInUp 0.8s ease forwards; animation-delay: 0.2s; }

.intro-paragraph {
    font-size: 18px;
    line-height: 1.8;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-left: 20px;
}

.intro-paragraph::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 4px; height: 0;
    background: var(--color-accent);
    animation: paragraphLine 0.6s ease forwards;
}
.intro-paragraph:nth-child(1)::before { animation-delay: 0.4s; }
.intro-paragraph:nth-child(2)::before { animation-delay: 0.6s; }
@keyframes paragraphLine { to { height: calc(100% - 16px); } }
.intro-paragraph:last-child { margin-bottom: 0; }

.about-features-label { display: none; }
.about-mobile-summary { display: none; list-style: none; margin: 0; padding: 0; }

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    opacity: 0;
    transform: translateY(20px);
}
.about-features.revealed { animation: fadeInUp 0.8s ease forwards; animation-delay: 0.4s; }

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.dark-mode .feature-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.feature-item:nth-child(1) { animation: slideInLeft 0.6s ease forwards; animation-delay: 0.5s; opacity: 0; }
.feature-item:nth-child(2) { animation: slideInLeft 0.6s ease forwards; animation-delay: 0.7s; opacity: 0; }
.feature-item:nth-child(3) { animation: slideInLeft 0.6s ease forwards; animation-delay: 0.9s; opacity: 0; }
@keyframes slideInLeft { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.feature-icon {
    font-size: 40px; line-height: 1;
    flex-shrink: 0;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.feature-icon svg {
    stroke: var(--color-accent);
    fill: none;
}

.feature-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}
.feature-content p { font-size: 14px; line-height: 1.6; color: var(--color-secondary); }

/* ─── PROJECTS ── */
.projects-section { padding-top: var(--spacing-xl); position: relative; }

.projects-header { margin-bottom: var(--spacing-md); }

.projects-intro {
    font-size: 16px;
    color: var(--color-secondary);
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
}
.projects-intro.revealed { animation: fadeInUp 0.8s ease forwards; animation-delay: 0.2s; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.project-grid-card {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
    backdrop-filter: blur(0);
}

body.dark-mode .project-grid-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.project-grid-card.revealed { animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

@media (min-width: 769px) {
    .project-grid-card:hover {
        transform: translateY(-6px);
        border-color: var(--color-accent);
        box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(193, 122, 90, 0.08);
    }
    body.dark-mode .project-grid-card:hover {
        box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5), 0 4px 8px -2px rgba(216, 144, 119, 0.1);
    }
}

.pgc-corner {
    position: absolute;
    width: 14px; height: 14px;
    border-color: var(--color-accent);
    border-style: solid;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    pointer-events: none;
}
.pgc-corner--tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.pgc-corner--tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.pgc-corner--bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.pgc-corner--br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

@media (min-width: 769px) {
    .project-grid-card:hover .pgc-corner { opacity: 1; }
}

.pgc-year {
    position: absolute;
    top: 10px; right: 14px;
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--color-secondary);
    z-index: 3;
    padding: 3px 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.pgc-image {
    width: 100%; height: 180px;
    overflow: hidden; position: relative;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-light);
    flex-shrink: 0;
}
.pgc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@media (min-width: 769px) { .project-grid-card:hover .pgc-image img { transform: scale(1.04); } }

.pgc-image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
}

body.dark-mode .pgc-image--empty { background: rgba(255,255,255,0.03); }

.pgc-empty-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
}

.pgc-empty-label {
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--color-secondary); opacity: 0.5;
    position: relative; z-index: 1;
    padding: 5px 12px;
    border: 1px dashed var(--color-border);
    background: var(--color-bg);
}

.pgc-body {
    padding: 1.4rem 1.5rem 1.3rem;
    display: flex; flex-direction: column; flex: 1;
    position: relative; z-index: 1;
}

.pgc-title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.pgc-title { font-family: var(--font-display); font-size: 22px; font-weight: 400; line-height: 1.2; color: var(--color-text); flex-shrink: 0; }
.pgc-title-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--color-border), transparent); }
.pgc-desc { font-size: 13px; line-height: 1.7; color: var(--color-secondary); flex: 1; margin-bottom: 1.1rem; }
.pgc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.2rem; }

.pgc-tag {
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--color-text);
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 2px;
}

.pgc-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.pgc-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--color-accent); text-decoration: none;
    transition: gap 0.25s ease;
}
.pgc-link:hover { gap: 10px; }
.pgc-link--disabled {
    color: var(--color-secondary); opacity: 0.5; cursor: default;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
}
.pgc-index-ghost {
    font-family: var(--font-display);
    font-size: 2.8rem; line-height: 1;
    color: var(--color-accent); opacity: 0.07;
    user-select: none;
}

/* ─── LOCK OVERLAY ── */
.section-lock-overlay { display: none; }

#about.is-locked, #projects.is-locked, #contact.is-locked { overflow: hidden; }

#about.is-locked .section-lock-overlay,
#projects.is-locked .section-lock-overlay,
#contact.is-locked .section-lock-overlay {
    display: flex;
    position: absolute; inset: 0;
    z-index: 20;
    align-items: center;
    justify-content: center;
    background: rgba(250, 248, 245, 0.82);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    pointer-events: all;
    animation: lockOverlayFadeIn 0.6s ease both;
}

body.dark-mode #about.is-locked .section-lock-overlay,
body.dark-mode #projects.is-locked .section-lock-overlay,
body.dark-mode #contact.is-locked .section-lock-overlay {
    background: rgba(17, 17, 17, 0.88);
}

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

.lock-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 3.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(193,122,90,0.12);
    border-top: 3px solid var(--color-accent);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04), 0 20px 60px -8px rgba(0,0,0,0.1);
    max-width: 440px;
    width: 90%;
    animation: lockCardSlideUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.15s both;
}

body.dark-mode .lock-overlay-inner {
    background: rgba(20, 20, 20, 0.98);
    border-color: rgba(216,144,119,0.15);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 20px 60px -8px rgba(0,0,0,0.6);
}

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

.lock-icon-wrap { position: relative; width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.6rem; }
.lock-svg { width: 56px; height: 56px; position: relative; z-index: 2; animation: lockBob 4s ease-in-out infinite; }
@keyframes lockBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.lock-shackle, .lock-body, .lock-keyhole, .lock-stem { stroke: var(--color-accent); }
.lock-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--color-accent); opacity: 0; animation: ringPulse 3s ease-out infinite; }
.lock-ring-1 { animation-delay: 0s; } .lock-ring-2 { animation-delay: 1.2s; }
@keyframes ringPulse { 0% { transform: scale(0.7); opacity: 0.5; } 100% { transform: scale(1.7); opacity: 0; } }
.lock-label { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; color: var(--color-text); margin-bottom: 0.65rem; line-height: 1.2; }
.lock-sub { font-family: var(--font-mono); font-size: 0.82rem; color: var(--color-secondary); line-height: 1.75; letter-spacing: 0.01em; }
.lock-divider { width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--color-accent), transparent); margin: 1.5rem auto; opacity: 0.5; }
.lock-status { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-secondary); display: flex; align-items: center; gap: 0.55rem; }
.lock-dot-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; animation: dotBlink 1.8s ease-in-out infinite; }
@keyframes dotBlink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ─── QUOTE ── */
.quote-section {
    padding: 2rem var(--spacing-lg);
    background: transparent;
    position: relative;
}

body.dark-mode .quote-section { background: transparent; }

.quote-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}
.quote-content.revealed { animation: fadeInUp 0.8s ease forwards; }
.quote-icon { font-family: var(--font-display); font-size: 120px; color: var(--color-accent); opacity: 0.12; line-height: 1; margin-bottom: -40px; user-select: none; }
.quote-text { font-family: var(--font-display); font-size: clamp(1.5rem,4vw,2.5rem); font-weight: 400; line-height: 1.6; color: var(--color-text); margin-bottom: var(--spacing-md); font-style: italic; padding: 0 var(--spacing-md); }
.quote-author { font-size: 18px; color: var(--color-accent); font-weight: 600; margin-bottom: var(--spacing-sm); letter-spacing: 0.05em; }
.quote-tag {
    display: inline-block;
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--color-secondary);
    padding: 6px 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    margin-top: var(--spacing-md);
    background: rgba(255,255,255,0.4);
}
body.dark-mode .quote-tag { background: rgba(255,255,255,0.04); }

/* ─── CONTACT ── */
.contact-section { padding: var(--spacing-xl) var(--spacing-lg); position: relative; }

.contact-content { max-width: 800px; margin: 0 auto; }
.contact-info {
    display: flex; flex-direction: column; gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    opacity: 0; transform: translateY(20px);
    position: relative; z-index: 1;
}
.contact-info.revealed { animation: fadeInUp 0.8s ease forwards; animation-delay: 0.2s; }

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

body.dark-mode .contact-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

@media (min-width: 769px) {
    .contact-link:hover {
        border-color: var(--color-accent);
        transform: translateX(12px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    body.dark-mode .contact-link:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
    .contact-link:hover .contact-label { color: var(--color-accent); }
}

.contact-icon { font-size: 40px; line-height: 1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--color-accent); }
.contact-icon svg { stroke: currentColor; fill: none; }
.contact-details { display: flex; flex-direction: column; align-items: flex-end; flex: 1; margin-left: var(--spacing-md); }
.contact-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-secondary); transition: color 0.3s ease; }
.contact-value { font-family: var(--font-display); font-size: 20px; font-weight: 400; }

.email-form-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s ease, margin-top 0.5s ease;
    margin-top: 0;
}
.email-form-container.active { max-height: 800px; opacity: 1; margin-top: var(--spacing-md); }

.email-form {
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
}

body.dark-mode .email-form {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.form-title { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin-bottom: var(--spacing-md); color: var(--color-text); }
.form-group { margin-bottom: var(--spacing-md); }
.form-group label { display: block; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: var(--spacing-xs); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    transition: border-color 0.3s ease;
}
body.dark-mode .form-group input, body.dark-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
}
@media (min-width: 769px) {
    .form-group input:focus, .form-group textarea:focus { border-color: var(--color-accent); }
}
.form-group textarea { resize: vertical; min-height: 120px; }

.submit-button {
    width: 100%; padding: 16px;
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    background-color: var(--color-accent); color: white;
    border: none; cursor: pointer;
    transition: all 0.3s ease;
    -webkit-user-select: none; user-select: none;
}
@media (min-width: 769px) {
    .submit-button:hover { background-color: var(--color-secondary); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(193,122,90,0.35); }
}
.submit-button:disabled { opacity: 0.6; cursor: not-allowed; }

.form-confirmation, .form-error {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    font-size: 14px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}
.form-confirmation { background: rgba(122,142,126,0.08); border-left: 4px solid var(--color-secondary); color: var(--color-secondary); }
.form-error { background: rgba(193,122,90,0.08); border-left: 4px solid var(--color-accent); color: var(--color-accent); }
.form-confirmation.show, .form-error.show { max-height: 100px; opacity: 1; margin-top: var(--spacing-md); }

/* ─── FOOTER ── */
.main-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-xl);
    background-color: var(--color-bg);
    position: relative; z-index: 1;
    width: 100%;
}

body.dark-mode .main-footer { background-color: #111111; }

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-secondary);
}

.footer-note { font-style: italic; opacity: 0; animation: fadeIn 1s ease forwards; animation-delay: 0.3s; }

/* ─── KEYFRAMES ── */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes revealText { to { opacity: 1; transform: translateY(0); } }

/* ─── RESPONSIVE 900px ── */
@media (max-width: 900px) {
    .project-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .project-grid-card:nth-child(3) { grid-column: 1 / -1; max-width: 440px; justify-self: center; width: 100%; }
}

/* ─── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
    }

    html { overflow-y: scroll; -webkit-overflow-scrolling: touch; }

    .main-nav { padding: 0.75rem 1.25rem; background: var(--color-bg); }
    body.dark-mode .main-nav { background: #111111; }
    .logo { font-size: 30px; }
    .dark-mode-toggle.desktop-only { display: none; }
    .dark-mode-toggle.mobile-only { display: flex; width: 36px; height: 36px; }
    .dark-mode-toggle.mobile-only .sun-icon, .dark-mode-toggle.mobile-only .moon-icon { width: 16px; height: 16px; }
    .burger-menu { width: 44px; height: 36px; display: flex !important; }
    .burger-line { height: 3px; }
    .nav-links { display: none; }

    .nav-links.active {
        display: flex !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important; height: 100vh !important;
        background: var(--color-bg) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 100px 0 70px !important;
        z-index: 1000 !important;
        overflow: hidden !important;
        animation: menuSlideIn 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        background-image:
            radial-gradient(ellipse 65% 50% at 15% 20%, rgba(193,122,90,0.06) 0%, transparent 65%),
            radial-gradient(ellipse 50% 55% at 85% 80%, rgba(122,142,126,0.04) 0%, transparent 65%) !important;
    }

    body.dark-mode .nav-links.active {
        background: #111111 !important;
        background-image:
            radial-gradient(ellipse 65% 50% at 15% 20%, rgba(216,144,119,0.06) 0%, transparent 65%),
            radial-gradient(ellipse 50% 55% at 85% 80%, rgba(143,160,146,0.04) 0%, transparent 65%) !important;
    }

    @keyframes menuSlideIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

    .nav-links.active a {
        position: relative !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 1.05rem 0 !important;
        font-size: 2.8rem !important;
        letter-spacing: -0.03em !important;
        min-width: 220px !important;
        border-bottom: 1px solid var(--color-border) !important;
        font-family: var(--font-display) !important;
        font-weight: 400 !important;
        color: var(--color-text) !important;
        text-decoration: none !important;
        transform: none !important;
        background: none !important;
    }
    .nav-links.active a:last-of-type { border-bottom: none !important; }
    .nav-links.active a::before, .nav-links.active a::after { display: none !important; }
    .nav-links.active a .menu-index { font-family: var(--font-mono) !important; font-size: 9px !important; letter-spacing: 0.12em !important; color: var(--color-accent) !important; opacity: 0.5 !important; flex-shrink: 0 !important; width: 20px !important; }
    .nav-links.active a .menu-text { flex: 1; }
    .nav-links.active a .menu-arrow { font-size: 0.85rem !important; color: var(--color-accent) !important; opacity: 0 !important; font-family: var(--font-mono) !important; }
    .nav-links.active .dark-mode-toggle { margin-top: 1.25rem; }

    .nav-menu-corner { position: absolute; width: 28px; height: 28px; border-color: var(--color-accent); border-style: solid; opacity: 0.2; pointer-events: none; z-index: 2; }
    .nav-menu-corner--tl { top: 72px; left: 18px; border-width: 2px 0 0 2px; }
    .nav-menu-corner--tr { top: 72px; right: 18px; border-width: 2px 2px 0 0; }
    .nav-menu-corner--bl { bottom: 60px; left: 18px; border-width: 0 0 2px 2px; }
    .nav-menu-corner--br { bottom: 60px; right: 18px; border-width: 0 2px 2px 0; }
    .nav-menu-topbar { position: absolute; top: 90px; left: 0; right: 0; padding: 0.75rem 2.75rem; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-secondary); opacity: 0.4; pointer-events: none; z-index: 3; border-bottom: 1px solid var(--color-border); border-top: 1px solid var(--color-border); }
    .nav-menu-bottombar { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem 1.25rem; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-secondary); opacity: 0.4; pointer-events: none; z-index: 3; border-top: 1px solid var(--color-border); }
    .nav-menu-statusdot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-accent); display: inline-block; margin-right: 5px; }
    .nav-menu-line { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); width: 1px; height: 35%; background: linear-gradient(to bottom, transparent, var(--color-accent), transparent); opacity: 0.1; pointer-events: none; }
    .nav-menu-dots { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
    .nav-menu-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--color-accent); }
    .nav-menu-dot:nth-child(1) { opacity: 0.4; } .nav-menu-dot:nth-child(2) { opacity: 0.25; } .nav-menu-dot:nth-child(3) { opacity: 0.15; } .nav-menu-dot:nth-child(4) { opacity: 0.08; }

    .hero { padding-top: 110px !important; padding-bottom: 1.5rem !important; min-height: auto !important; }
    .hero-layout { align-items: center; text-align: center; }
    .hero-label { text-align: center; margin-bottom: 0.875rem; font-size: 10px; }
    .hero-name-block { width: 100%; text-align: center; padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
    .hero-title { font-size: clamp(2.4rem, 11vw, 3.4rem) !important; text-align: center !important; white-space: normal !important; line-height: 1.05 !important; }
    .hero-info-row { flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
    .hero-info-left { align-items: center; gap: 0.3rem; }
    .hero-role { font-size: 15px; }
    .hero-desc { text-align: center; max-width: 100%; font-size: 13px; }
    .hero-info-right { align-items: center; flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 0.875rem; }
    .hero-status { font-size: 10px; }
    .hero-meta-item { font-size: 10px; opacity: 0.6; }

    .about-section, .projects-section, .quote-section, .contact-section {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .about-section.section-visible, .projects-section.section-visible,
    .quote-section.section-visible, .contact-section.section-visible { opacity: 1; transform: translateY(0); }
    .about-section.section-above, .projects-section.section-above,
    .quote-section.section-above, .contact-section.section-above { opacity: 0; transform: translateY(-16px); }

    section {
        padding: 1.5rem 1.25rem !important;
    }
    .tv-palette-section { padding: 1.5rem 0 !important; overflow: visible !important; }
    .tv-palette-inner {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.25rem !important;
    }
    .tv-stage {
        overflow: visible !important;
        min-height: 360px !important;
        padding: 1.5rem 0 !important;
    }
    .tv-body {
        width: 320px !important;
    }
    .tv-text-side {
        width: 100% !important;
        text-align: center !important;
    }
    .tv-grain {
        display: none !important;
    }
    .tv-screen::after {
        background: transparent !important;
    }
    .tv-scanlines {
        opacity: 0.05 !important;
    }
    .section-title { font-size: clamp(2rem, 8vw, 2.8rem) !important; margin-bottom: 0.875rem !important; }
    .about-main { gap: 1.25rem !important; margin-bottom: 1rem !important; }

    .about-text-block { display: none; }
    .intro-paragraph::before { display: none; }

    .about-mobile-summary {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .about-mobile-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
        font-size: 14px;
        line-height: 1.6;
        color: var(--color-text);
        list-style: none;
    }

    .about-mobile-item:last-child { border-bottom: none; }

    .about-mobile-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--color-accent);
        flex-shrink: 0;
        margin-top: 0.48rem;
    }

    .about-features-label {
        font-size: 10px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--color-secondary);
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .feature-item { flex-direction: row; align-items: center; padding: 0.875rem; gap: 0.875rem; }
    .feature-icon { font-size: 28px; width: 38px; height: 38px; flex-shrink: 0; }
    .feature-icon svg { width: 30px !important; height: 30px !important; }
    .feature-content h3 { font-size: 16px; margin-bottom: 3px; }
    .feature-content p { font-size: 13px; }
    .about-features { gap: 0.6rem; }

    .projects-intro { font-size: 15px; }
    .projects-header { margin-bottom: 0.875rem; }

    .contact-link { flex-direction: row; align-items: center; gap: 0.875rem; padding: 0.875rem 1rem; }
    .contact-info { gap: 0.625rem; margin-top: 1rem; }
    .contact-details { align-items: flex-end; margin-left: 0.5rem; }
    .contact-value { font-size: 18px; }
    .contact-icon { font-size: 28px; flex-shrink: 0; }
    .contact-icon svg { width: 20px !important; height: 20px !important; }
    .contact-label { font-size: 11px; }
    .email-form-container.active { margin-top: 0.875rem; }
    .form-title { font-size: 22px; margin-bottom: 0.875rem; }
    .email-form { padding: 0.875rem; }
    .form-group { margin-bottom: 0.75rem; }
    .form-group input, .form-group textarea { font-size: 15px; padding: 11px 13px; }
    .form-group textarea { min-height: 90px; }
    .submit-button { padding: 12px; font-size: 11px; }

    .main-footer {
        margin-top: 3rem !important;
        padding: 1rem 1.25rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    }
    .footer-content { flex-direction: column; gap: 0.375rem; text-align: center; font-size: 13px; }

    section::before { display: none; }
    .scroll-indicator { display: none !important; }
    .shape-3, .shape-4 { display: none; }
    body { padding-bottom: env(safe-area-inset-bottom, 0); }

    .lock-overlay-inner { padding: 2.25rem 1.75rem 2rem; max-width: 100%; width: calc(100% - 2rem); }
    .lock-icon-wrap { width: 76px; height: 76px; margin-bottom: 1.25rem; }
    .lock-svg { width: 48px; height: 48px; }
    .lock-label { font-size: 1.5rem; }
    .lock-sub { font-size: 0.85rem; }
    .lock-divider { margin: 1.2rem auto; }

    .quote-section { padding: 1.5rem 1.25rem; }
    .quote-content { padding: var(--spacing-md); }
    .quote-icon { font-size: 80px; margin-bottom: -30px; }
    .quote-text { font-size: clamp(1.3rem,5vw,1.9rem); padding: 0; }
    .quote-author { font-size: 16px; }
}

@media (max-width: 600px) {
    .project-grid { grid-template-columns: 1fr; gap: 0.875rem; margin-top: 0.875rem; }
    .project-grid-card:nth-child(3) { grid-column: auto; max-width: none; justify-self: stretch; }
    .pgc-image { height: 130px; }
    .pgc-title { font-size: 19px; }
    .pgc-desc { font-size: 14px; }
    .pgc-body { padding: 0.875rem 1rem 0.75rem; }
    .pgc-index-ghost { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    :root { --spacing-md: 1rem; }
    .hero { padding-top: 100px !important; }
    .hero-title { font-size: clamp(2.1rem, 11vw, 2.8rem) !important; }
    .section-title { font-size: clamp(1.8rem, 8.5vw, 2.3rem) !important; }
    .logo { font-size: 27px; }
    .burger-menu { width: 40px; height: 34px; }
    section { padding: 1.25rem 1rem !important; }
    .contact-link { padding: 0.75rem; gap: 0.625rem; }
    .contact-icon svg { width: 18px !important; height: 18px !important; }
    .contact-value { font-size: 16px; }
    .decorative-dots { display: none; }
    .feature-item { padding: 0.75rem; gap: 0.625rem; }
    .feature-icon { width: 32px; height: 32px; }
    .feature-icon svg { width: 26px !important; height: 26px !important; }
    .intro-paragraph { font-size: 14px; }
    .hero-role { font-size: 14px; }
    .footer-content { font-size: 12px; }
}

@media (min-width: 769px) {
    .about-section { padding-top: 3rem; }
    .projects-section { padding-top: 3rem; }
}

/* ── DESKTOP NAV LIGHTSWITCH ── */
/* ── DESKTOP NAV SIZE OVERRIDES ── */
@media (min-width: 769px) {
    .logo { font-size: 1.6rem !important; }
    .nav-links a { font-size: 0.9rem !important; letter-spacing: 0.14em !important; }
}

/* ── DESKTOP LIGHT SWITCH (nav) ── */
.nav-ls-wrap-desktop {
    position: relative;
    display: flex;
    align-items: center;
}
/* Hide on mobile — mobile uses the burger menu switch */
@media (max-width: 768px) {
    .nav-ls-wrap-desktop { display: none; }
}
.nav-ls-container-desktop {
    position: relative;
    width: 116px;
    height: 54px;
}
.nav-ls-rope-svg-desktop {
    position: absolute;
    top: 100%;
    left: 21px;
    transform: none;
    pointer-events: none;
    overflow: visible;
    z-index: 5;
}
.nav-ls-btn-desktop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--color-secondary) 25%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--color-secondary) 40%, transparent);
    border-radius: 999px;
    padding: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.4s ease, border-color 0.4s ease;
}
.nav-ls-btn-desktop.ls-is-light {
    background: color-mix(in srgb, var(--color-accent) 22%, transparent);
    border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}
.nav-ls-knob-desktop {
    width: 42px;
    height: 42px;
    position: relative;
    will-change: transform;
    border-radius: 999px;
    overflow: hidden;
}
.nav-ls-top-desktop {
    background-color: var(--color-secondary);
    border-radius: 999px;
    position: absolute;
    inset: 0;
    transition: background-color 0.4s ease;
    opacity: 0.75;
}
.nav-ls-btn-desktop.ls-is-light .nav-ls-top-desktop {
    background-color: var(--color-accent);
    opacity: 1;
}
.nav-ls-shine-desktop {
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.28) 0%, transparent 65%);
    pointer-events: none;
}

