:root { 
    /* Fixed nav overlap: titles & in-page anchors clear the bar */
    --nav-clearance: clamp(112px, 18vw, 152px);
    --bg: #040915; 
    --bg2: #081427; 
    --surface: rgba(127, 176, 255, 0.08);
    --border: rgba(133, 190, 255, 0.18); 
    --border-hover: rgba(166, 219, 255, 0.38);
    --text-primary: #e8f3ff; 
    --text-secondary: #9bb9d8; 
    --text-muted: #6384a8; 
    --accent: #59a7ff; 
    --accent2: #74d7ff; 
    --accent3: #8ff2f8; 
    --glow: rgba(89, 167, 255, 0.24); 
    --glow2: rgba(116, 215, 255, 0.2); 
    --radius: 24px; 
    --radius-sm: 16px; 
}

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

html {scroll-behavior: smooth; }

body { 
    background:
        radial-gradient(circle at 10% 12%, rgba(89,167,255,0.16) 0%, transparent 34%),
        radial-gradient(circle at 88% 82%, rgba(116,215,255,0.14) 0%, transparent 36%),
        linear-gradient(160deg, var(--bg) 0%, var(--bg2) 55%, #07172a 100%);
    color: var(--text-primary);
    font-family: "Lato", sans-serif;
    font-weight: 500;
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */ 

.cursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-ring.hovering {
    width: 60px; height: 60px;
    border-color: rgba(124,111,255,0.8);
}
 /* ── Canvas Background ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.78;
}
.noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Layout */ 
main { position: relative; z-index: 2; }

section {
    min-height: 100vh;
    display: flex;
    align-items: center; 
    padding: 100px 8vw;
}

section[id] {
    scroll-margin-top: var(--nav-clearance);
}

/* nav */ 
nav{
    position: fixed; 
    top: 0; left: 0; right: 0; 
    z-index: 100; 
    padding: 12px 8vw;
    display: flex; 
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid transparent; 
    transition: border-color 0.4s ease, background 0.4s ease; 
}

nav.scrolled {
    background: rgba(6,18,35,0.72); 
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: "Lato", sans-serif;
    font-size: 6rem;
    font-weight: 400;
    color: var(--text-primary); 
    text-decoration: none;
    letter-spacing: 0.02em; 
    display: inline-flex; 
    align-items: center;
    gap: 12px;
}
.logo-mark { 
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(126, 197, 255, 0.2));
    opacity: 0.95;
}
.logo-fallback { 
    font-size: 1.05;
}
.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}
.nav-audio-item {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-audio-btn {
    font-family: "Lato", sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(89, 167, 255, 0.35);
    background: rgba(89, 167, 255, 0.12);
    color: var(--accent2);
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nav-audio-btn:hover {
    border-color: rgba(116, 215, 255, 0.55);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(89, 167, 255, 0.18);
}

.nav-links a {
    font-size: 0.8rem; 
    font-weight: 400; 
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after{
    content: '';
    position: absolute;
    bottom: -4px; left:0; right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease; 
    transform-origin: left;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after {transform: scaleX(1); }

/* Hero */ 
#hero {
    min-height: 100vh; 
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0; 
    padding-top: calc(var(--nav-clearance) + 1.25rem);
    scroll-margin-top: 0;
}

.hero-label {
    font-size: 2rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent); 
    margin-bottom: 24px; 
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
    font-family: "Freckle Face", system-ui, sans-serif;
    /* min ≤ max: scales with viewport; middle term dominates on phones */
    font-size: clamp(3rem, 17vw + 0.35rem, 9rem);
    font-weight: 200; 
    line-height: 0.95;
    letter-spacing: 0.04em;
    color: var(--text-primary); 
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-title .letter{
    display: inline-block;
    color: var(--text-primary);
    position: relative;
    will-change: transform, filter;
    transform: translateY(20px);
    animation: fadeUp 0.9s ease forwards;
}

  .hero-title .letter:nth-child(1) { animation-delay: 0.4s; }
  .hero-title .letter:nth-child(2) { animation-delay: 0.48s; }
  .hero-title .letter:nth-child(3) { animation-delay: 0.56s; }
  .hero-title .letter:nth-child(4) { animation-delay: 0.64s; }
  .hero-title .letter:nth-child(5) { animation-delay: 0.72s; }
  /* Stronger selector so the “i” always wins over .letter */
  .hero-title .letter.letter-i {
    color: var(--accent);
    -webkit-text-fill-color: currentColor;
    font-variant: normal;
    text-transform: lowercase;
    font-size: 0.82em;
  }


.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 480px;
    margin-top: 32px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.9s ease 0.7s forwards;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.9s ease 0.9s forwards;
}
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: none;
  }
  .btn-primary {
    background: var(--accent);
    color: #eef7ff;
    border: 1px solid var(--accent);
    box-shadow: 0 10px 32px rgba(45, 116, 224, 0.3);
  }
  .btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 32px var(--glow);
  }
  .btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
  }
  .btn-audio {
    background: rgba(89,167,255,0.14);
    color: var(--accent2);
    border: 1px solid rgba(89,167,255,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .btn-audio:hover {
    border-color: rgba(116,215,255,0.6);
    box-shadow: 0 0 28px rgba(89,167,255,0.22);
    color: var(--text-primary);
  }


.btn-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--accent);
    color: #eef7ff;
    border: 1px solid var(--accent);
    box-shadow: 0 10px 32px rgba(45, 116, 224, 0.3);
    
}


  .hero-scroll {
    position: absolute;
    bottom: 48px;
    left: 8vw;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeUp 1s ease 1.4s forwards;
  }
  .scroll-line {
    width: 40px;
    height: 1px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
  }
  .scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-100%);
    animation: scrollLine 2s ease 2s infinite;
  }
  @keyframes scrollLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }


/* Section Header */ 
.section-header {
    margin-bottom: 64px;
}

 .about-title-row {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3vw, 28px);
    flex-wrap: wrap;
  }

   /*.about-title-row .about-logo-mark {
    width: clamp(56px, 8vw, 72px);
    height: clamp(56px, 8vw, 72px);
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(126, 197, 255, 0.22));
    opacity: 0.95;
  }
    */

    .about-section-title {
    margin: 2;
    flex: 1;
    min-width: 0;
  }
  .about-intro-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
    max-width: 520px;
  }
  
.section-number {
    font-size: 0.7rem;
    letter-spacing: 0.2em; 
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: "Freckle Face", system-ui;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300; 
    line-height: 1;
    color: var(--text-primary);
}

.section-title em {
    /*font-style: italic;*/
    color: var(--accent);
}

/* Work */ 
#work { flex-direction: column; align-items: flex-start;}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.folder-wrap {
    display: flex; 
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}
a.folder-wrap.folder-hit {
    text-decoration: none;
    color: inherit;
    outline: none;
}
a.folder-wrap.folder-hit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
    border-radius: var(--radius-sm);
}

.folder-tab {
    align-self: flex-end;
    width: clamp(150px, 48%, 220px);
    height: 50px;
    background:linear-gradient(180deg, rgba(116, 215, 255, 0.52), rgba(72, 140, 220, 0.38));
    border: 1px solid rgba(150, 220, 255, 0.55);
    border-bottom: none;
    border-radius: 20px 20px 0px 0px;
    transition: brackground 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative; 
    z-index: 10;
    margin-bottom: -5px;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.folder-wrap:hover .folder-tab {
    border-color: rgba(180, 232, 255, 0.75);
    background:   rgba(89, 167, 255, 0.52);
    box-shadow: 0 0 28px rgba(89, 167, 255, 0.28);
  }
  .folder-wrap--featured {
    grid-column: span 2;
  }

  .project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 var(--radius-sm) var(--radius-sm);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    cursor: none;
  }
  .project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 0%, var(--glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
  }
  .folder-wrap:hover .project-card {
    border-color: rgba(89,167,255,0.55);
    background: linear-gradient(170deg, rgba(98, 166, 255, 0.13), rgba(62, 117, 199, 0.08));
    transform: translateY(-6px) rotate(-0.35deg);
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  }
  .folder-wrap:hover .project-card::before { opacity: 1; }
  .project-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }
  .project-card.featured::before {
    background: radial-gradient(ellipse at 30% 50%, var(--glow), transparent 60%);
  }

  .project-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 4px 12px;
    background: rgba(89,167,255,0.14);
    border: 1px solid rgba(89,167,255,0.32);
    border-radius: 100px;
  }
  .project-title {
    font-family: 'Lato', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
  }
  .project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
  }
  .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tech-tag {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: border-color 0.3s, color 0.3s;
  }
  .folder-wrap:hover .tech-tag {
    border-color: rgba(255,255,255,0.15);
    color: var(--text-secondary);
  }
  .project-visual {
    aspect-ratio: 16/10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
  }
  .project-visual canvas {
    width: 100%; height: 100%;
    display: block;
  }
  .project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    margin-top: 20px;
    transition: gap 0.3s ease;
  }
  .folder-wrap:hover .project-link { gap: 14px; }
  .project-link svg { transition: transform 0.3s ease; }
  .folder-wrap:hover .project-link svg { transform: translateX(4px); }




/* About */ 

#about {
    flex-direction: column; 
    align-items: flex-start;
    gap: clamp(48px, 7vw, 88px);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; 
    gap: 80px;
    align-items: center;
    width: 100%;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 20px;
}

.about-text p strong {
    color: var(--text-primary);
    font-weight: 400; 
}

.skills-list {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    margin-top: 40px; 
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px; 
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.slill-dot {
    width: 5px; height: 5px; 
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.about-stats {
    display: flex; 
    flex-direction: column; 
    gap: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius); 
    padding: 28px 32px; 
    transition: border-color 0.3s, box-shadow 0.3; 
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 38px rgba(35, 90, 170, 0.34);
}

.stat-number {
    font-family: "Lato", sans-serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-number span { color: var(--accent); }
.stat-label {
    font-size: 0.82rem; 
    color: var(--text-muted);
    letter-spacing: 0.08em;
}


/* Services */ 

#services { flex-direction: column; align-items: flex-start; }
.services-grid {
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px) calc(var(--radius) - 2px) calc(var(--radius) + 10px) calc(var(--radius) - 4px);
    padding: 36px;
    transition: all 0.4s ease;
    cursor: none;
    position: relative;
    overflow: hidden;
}


.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left; 
}


.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px) rotate(0.4deg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}


.service-card:hover::after { transform: scaleX(1); }

.service-title {
    font-family: 'Lato', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}



/* Music */ 
#music {
    flex-direction: column; 
    align-items: flex-start;
}

.music-grid {
    width: 100%;
    display: grid; 
    grid-template-columns: 1.1fr 1fr;
    gap: 22px;
}

.music-player,
.music-note {
    background: linear-gradient(145deg, rgba(122, 189, 255, 0.14), rgba(44, 88, 139, 0.08));
    border: 1px solid rgba(150, 210,255, 0,24);
    border-radius: 28px; 
    padding: 28px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}


.music-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent2); 
    margin-bottom: 12px;
}


.track-title {
    font-family: 'Lato', sans-serif;
    font-size: 2rem; 
    line-height: 1.1;
    margin-bottom: 8px; 
}


.track-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}



.wave-visual {
    height: 62px;
    border-radius: 18px;
    background:
      radial-gradient(circle at 15% 50%, rgba(116,215,255,0.25), transparent 45%),
      repeating-linear-gradient(90deg, rgba(146,213,255,0.15) 0 2px, transparent 2px 9px),
      rgba(2, 16, 34, 0.55);
    border: 1px solid rgba(150, 210, 255, 0.2);
    margin-bottom: 20px;
}

.music-controls {
    display: flex;
    gap: 12px; 
    align-items: center;
    flex-wrap: wrap;
}


.music-btn {
    border: 1px solid rgba(150,210, 255, 0.28); 
    border-radius: 999px; 
    background: rgba(116, 215, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 18px; 
    font-size: 0.8em;
    text-transform: uppercase;
    cursor: none; 
    transition: all 0.3s ease;
}


.music-btn:hover {
    border-color: var(--accent2);
    box-shadow: 0 0 20px rgba(116, 215, 255, 0.24);
}

/* Contact */ 
#contact {
    flex-direction: column;
    align-items: center; 
    text-align: center;
    gap: 0;
}

.contact-headline {
    font-family: "Freckle Face", system-ui;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.contact-headline em { 
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.contact-sub {
    font-size: 2rem;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.7;
    margin-bottom: 48px;
}


.contact-email {
    font-family: 'Lato', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    display: inline-block;
    margin-bottom: 64px;
    transition: color 0.3s;
}

.contact-email::after {
    content: '';
    position: absolute; 
    bottom: -4px; left: 0; right: 0; 
    height: 1px; 
    background: linear-gradient(90deg, var(--accent), var(accent2));
    transform: scaleX(0.3);
    transform-origin: left; 
    transition: transform 0.4s ease;
}

.contact-email:hover { color: var(--accent); }
.contact-email:hover::after { transform: sca;eX(1); }
.social-links {
    display: flex;
    gap: 20px;
}


.social-link{
    width: 44px; height: 44px; 
    border: 1px solid var(--border);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-muted);
    text-decoration: none; 
    transition: all 0.3s ease;
    cursor: none;
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--glow);
}



/* Slightly less rigid composition */
  .projects-grid .folder-wrap:nth-child(2),
  .services-grid .service-card:nth-child(2) {
    transform: rotate(-0.22deg);
  }
  .projects-grid .folder-wrap:nth-child(3),
  .services-grid .service-card:nth-child(3) {
    transform: rotate(0.28deg);
  }

/* Reveal Animations */ 
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45; }


@keyframes fadeUp {
    to { opacity: 1; transform: none; }
  }


  /* Tablet portrait / narrow: single-column layouts, compact nav */
  @media (max-width: 900px) {
    .projects-grid { grid-template-columns: 1fr; }
    .folder-wrap--featured { grid-column: span 1; }
    .project-card.featured { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .services-grid { grid-template-columns: 1fr; }
    .music-grid { grid-template-columns: 1fr; }
    nav {
      padding: 14px 5vw;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .nav-logo,
    .navbar-logo {
      flex-shrink: 0;
    }
    /* Same row as logo; scroll horizontally if links don’t fit */
    .nav-links {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: flex-end;
      gap: 10px 14px;
      flex: 1 1 auto;
      min-width: 0;
      width: auto;
      margin: 0;
      padding: 4px 0;
      border-top: none;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
    }
    .nav-links li {
      flex-shrink: 0;
    }
    .nav-links a {
      font-size: 0.62rem;
      letter-spacing: 0.08em;
      flex-shrink: 0;
      white-space: nowrap;
    }
    .nav-audio-btn {
      font-size: 0.58rem;
      padding: 0.34rem 0.65rem;
      letter-spacing: 0.08em;
      flex-shrink: 0;
      white-space: nowrap;
    }
    section { padding: 72px 6vw; }
    .hero-scroll {
      left: 6vw;
      bottom: 32px;
    }
    footer {
      flex-direction: column;
      gap: 16px;
      text-align: center;
      align-items: center;
    }
  }

  /* Mobile: phones and very small viewports */
  @media (max-width: 600px) {
    :root {
      --radius: 18px;
      --radius-sm: 12px;
      --nav-clearance: clamp(76px, 20vw, 108px);
    }
    nav { padding: 12px 5vw; }
    .nav-logo { font-size: 1.2rem; }
    .logo-mark { width: 40px; height: 40px; }
    .nav-links {
      gap: 8px 12px;
      padding: 2px 0;
    }
    .nav-links a {
      font-size: 0.58rem;
    }
    .nav-audio-btn {
      font-size: 0.54rem;
      padding: 0.32rem 0.55rem;
    }
    section { padding: 56px 5vw; }
    #hero {
      padding-top: calc(var(--nav-clearance) + 0.75rem);
      align-items: stretch;
      min-height: auto;
      padding-bottom: clamp(2rem, 8vw, 4rem);
    }
    .hero-title {
      font-size: clamp(3.35rem, 19vw + 0.4rem, 8rem);
      letter-spacing: 0.03em;
    }
    .hero-label {
      font-size: clamp(0.68rem, 2.8vw, 1rem);
      letter-spacing: 0.12em;
      margin-bottom: 16px;
    }
    .hero-name {
      font-size: clamp(2.75rem, 14vw, 4.5rem);
    }
    .hero-tagline {
      margin-top: 20px;
      font-size: 0.95rem;
    }
    .hero-cta {
      margin-top: 32px;
      flex-direction: column;
      align-items: stretch;
    }
    .btn {
      justify-content: center;
      padding: 14px 22px;
    }
    .hero-scroll {
      left: 5vw;
      bottom: 24px;
      font-size: 0.65rem;
    }
    .section-title {
      font-size: clamp(2rem, 9vw, 2.75rem);
    }
    .section-number {
      font-size: 0.65rem;
    }
    .project-card {
      padding: 24px 20px;
    }
    .project-title {
      font-size: 1.5rem;
    }
    .project-desc {
      font-size: 0.85rem;
      margin-bottom: 20px;
    }
    .skills-list {
      grid-template-columns: 1fr;
    }
    .stat-card {
      padding: 22px 24px;
    }
    .stat-number {
      font-size: 2.25rem;
    }
    .track-title {
      font-size: 1.5rem;
    }
    .music-player,
    .music-note {
      padding: 20px;
      border-radius: 20px;
    }
    .contact-headline {
      font-size: clamp(2.25rem, 11vw, 3.25rem);
    }
    .contact-email {
      font-size: clamp(1.1rem, 5vw, 1.35rem);
      word-break: break-word;
    }
    .social-links {
      flex-wrap: wrap;
      justify-content: center;
    }
    .projects-grid .folder-wrap:nth-child(2),
    .projects-grid .folder-wrap:nth-child(3),
    .services-grid .service-card:nth-child(2),
    .services-grid .service-card:nth-child(3) {
      transform: none;
    }
  }

/* ── Ravyn case study — charcoal gray (#292828) atmosphere ── */

body.ravyn-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(120, 118, 118, 0.12) 0%, transparent 40%),
    linear-gradient(160deg, #141414 0%, #292828 48%, #0a0a0a 100%);
}

body.ravyn-page #bg-canvas {
  opacity: 0.72;
}

body.ravyn-page .noise {
  opacity: 0.035;
}

body.ravyn-page .ravyn-main {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-clearance);
}

body.ravyn-page .ravyn-section {
  min-height: auto;
  display: block;
  padding: 1.25rem max(24px, 4vw) 4rem;
}

body.ravyn-page .nav-links a {
  color: #ffffff;
}

body.ravyn-page .nav-links a:hover {
  color: #ffffff;
}

body.ravyn-page .nav-audio-btn {
  border-color: rgba(200, 210, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #ececec;
}

body.ravyn-page .nav-audio-btn:hover {
  border-color: rgba(180, 200, 255, 0.55);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(160, 190, 255, 0.12);
}

body.ravyn-page nav.scrolled {
  background: rgba(22, 22, 22, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* ── ECHO case study — maroon atmosphere (#68160A), white nav links ── */
body.echo-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(232, 112, 78, 0.17) 0%, transparent 36%),
    radial-gradient(circle at 88% 82%, rgba(140, 36, 24, 0.14) 0%, transparent 38%),
    linear-gradient(160deg, #2a0a06 0%, #68160A 50%, #0f0302 100%);
}

body.echo-page #bg-canvas {
  opacity: 0.74;
}

body.echo-page .noise {
  opacity: 0.032;
}

body.echo-page .echo-main {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-clearance);
}

body.echo-page .echo-section {
  min-height: auto;
  display: block;
  padding: 1.25rem max(24px, 4vw) 4rem;
}

/* Echo case study sections: undo global `section { display:flex }` so headings stack above content */
body.echo-page .echo-section > section {
  display: block;
  min-height: 0;
  align-items: stretch;
  padding: 0;
}

body.echo-page .nav-links a {
  color: #ffffff;
}

body.echo-page .nav-links a:hover {
  color: #ffffff;
}

body.echo-page .nav-audio-btn {
  border-color: rgba(255, 190, 165, 0.4);
  background: rgba(255, 120, 90, 0.12);
  color: rgba(255, 246, 242, 0.95);
}

body.echo-page .nav-audio-btn:hover {
  border-color: rgba(255, 200, 170, 0.65);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(255, 140, 110, 0.2);
}

body.echo-page nav.scrolled {
  background: rgba(52, 10, 6, 0.78);
  border-bottom-color: rgba(255, 170, 130, 0.22);
}

/* ── Case study pages: custom cursor (index-style motion, themed colors) ── */
body.echo-page,
body.ravyn-page {
  cursor: none;
}

body.echo-page .mock-zoom,
body.ravyn-page .mock-zoom {
  cursor: none;
}

body.echo-page .cursor,
body.ravyn-page .cursor {
  mix-blend-mode: normal;
  /* Above .lightbox (10050) so the custom cursor stays visible when a mockup is enlarged */
  z-index: 10060;
}

body.echo-page .cursor-ring,
body.ravyn-page .cursor-ring {
  z-index: 10059;
}

/* Match page cursor inside lightbox (close button had system pointer; image uses default) */
body.echo-page .lightbox,
body.echo-page .lightbox__backdrop,
body.echo-page .lightbox__frame,
body.echo-page .lightbox__img,
body.echo-page .lightbox__close,
body.ravyn-page .lightbox,
body.ravyn-page .lightbox__backdrop,
body.ravyn-page .lightbox__frame,
body.ravyn-page .lightbox__img,
body.ravyn-page .lightbox__close {
  cursor: none;
}

/* ECHO — warm maroon / ember accent */
body.echo-page .cursor-dot {
  background: #fff5f0;
  box-shadow: 0 0 16px rgba(255, 160, 130, 0.45);
}

body.echo-page .cursor-ring {
  border: 1px solid rgba(255, 190, 165, 0.55);
}

body.echo-page .cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: rgba(255, 130, 95, 0.92);
  box-shadow: 0 0 28px rgba(255, 120, 90, 0.35);
}

/* Ravyn — cool graphite / silver accent */
body.ravyn-page .cursor-dot {
  background: #ececec;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

body.ravyn-page .cursor-ring {
  border: 1px solid rgba(220, 220, 220, 0.38);
}

body.ravyn-page .cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: rgba(180, 210, 255, 0.65);
  box-shadow: 0 0 24px rgba(160, 190, 255, 0.12);
}

@media (hover: none), (pointer: coarse) {
  body.echo-page .cursor,
  body.echo-page .cursor-ring,
  body.ravyn-page .cursor,
  body.ravyn-page .cursor-ring {
    display: none !important;
  }
  body.echo-page,
  body.ravyn-page {
    cursor: auto;
  }
  body.echo-page a,
  body.echo-page button,
  body.ravyn-page a,
  body.ravyn-page button {
    cursor: pointer;
  }
}

/* ── Case study pages: typography + mockup strip + captions ── */

.case-hero {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.case-title {
  font-family: 'Freckle Face', system-ui, sans-serif;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.case-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

body.echo-page .case-title,
body.echo-page .case-subtitle {
  color: #f5ecea;
}

body.echo-page .case-subtitle {
  color: rgba(245, 236, 234, 0.72);
}

body.ravyn-page .case-title,
body.ravyn-page .case-subtitle {
  color: #ececec;
}

body.ravyn-page .case-subtitle {
  color: rgba(236, 236, 236, 0.65);
}

/* Horizontal mockup strip */
.mock-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 100%;
}

.mock-scroll {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 0.5rem 0 1rem;
  flex: 1;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.mock-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(42vw, 320px);
  max-width: 100%;
  margin: 0;
}

.mock-zoom {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
}

.mock-zoom:focus-visible {
  outline: 2px solid rgba(255, 200, 170, 0.85);
  outline-offset: 3px;
}

body.ravyn-page .mock-zoom:focus-visible {
  outline-color: rgba(200, 215, 255, 0.75);
}

.mock-zoom img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

body.echo-page .mock-zoom img {
  border-color: rgba(255, 180, 150, 0.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body.ravyn-page .mock-zoom img {
  border-color: rgba(255, 255, 255, 0.14);
}

.mock-strip__hint {
  flex-shrink: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  animation: mock-hint-bounce 2s ease-in-out infinite;
}

.mock-strip__hint--right {
  animation-delay: 0.12s;
}

@keyframes mock-hint-bounce {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.35;
  }
  50% {
    transform: translateX(6px);
    opacity: 0.85;
  }
}

.mock-strip__hint--left {
  animation-name: mock-hint-bounce-left;
}

@keyframes mock-hint-bounce-left {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.35;
  }
  50% {
    transform: translateX(-6px);
    opacity: 0.85;
  }
}

@media (max-width: 600px) {
  .mock-strip__hint {
    display: none;
  }
  .mock-slide {
    width: min(78vw, 280px);
  }
}

/* Ravyn: synced caption under strip */
.caption-shell {
  margin-top: 0.25rem;
  max-width: 42rem;
}

.caption-panels {
  position: relative;
  min-height: 6.5rem;
}

.caption-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

body.ravyn-page .caption-panel {
  background: rgba(42, 40, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(236, 236, 236, 0.92);
}

.caption-panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
}

.caption-panel strong {
  font-weight: 400;
  color: #fff;
}

/* Echo: intro + case study writeup */
.case-intro-card {
  font-family: 'Lato', sans-serif;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.75;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 42rem;
}

body.echo-page .case-intro-card {
  background: rgba(88, 22, 15, 0.45);
  border: 1px solid rgba(255, 170, 130, 0.22);
  color: rgba(255, 246, 242, 0.92);
}

/* ECHO — vertical narrative blocks (top → bottom) */
body.echo-page .echo-block {
  width: 100%;
  max-width: min(1240px, 100%);
}

body.echo-page .echo-block__heading {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.68rem, 1.1vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 200, 170, 0.88);
  margin-bottom: 1rem;
}

body.echo-page .echo-block--overview .case-intro-card {
  margin-bottom: 0;
}

body.echo-page .echo-block--overview {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  /*border-top: 1px solid rgba(255, 170, 130, 0.22);*/
}

/* Gallery directly under hero — no top rule (was lower on page before) */
body.echo-page .case-hero + .echo-block--gallery {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-bottom: 0;
}

body.echo-page .echo-block--gallery .mock-strip {
  margin-bottom: 0;
}

body.echo-page .echo-block__heading--gallery {
  font-family: 'Lato', sans-serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: none;
  color: rgba(255, 246, 242, 0.95);
  margin-bottom: 0.35rem;
}

body.echo-page .echo-gallery__lede {
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(245, 236, 234, 0.62);
  margin-bottom: 1.35rem;
  max-width: 42rem;
}

.case-writeup {
  margin-top: 0.5rem;
}

body.echo-page .echo-writeup.case-writeup {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

body.echo-page .case-writeup__title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(255, 246, 242, 0.96);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  /*border-top: 1px solid rgba(255, 170, 130, 0.28);*/
}

body.echo-page .case-writeup__stack {
  counter-reset: echo-writeup-step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  max-width: 42rem;
}

body.echo-page .case-writeup__stack-item {
  counter-increment: echo-writeup-step;
  margin: 0;
  padding: 0;
}

/* Step index above each card (not beside), keeps Problem/Approach/Outcome stacked vertically */
body.echo-page .echo-writeup .case-writeup__card::before {
  content: counter(echo-writeup-step, decimal-leading-zero);
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(255, 200, 170, 0.5);
  margin-bottom: 0.6rem;
}

.case-writeup__card {
  font-family: 'Lato', sans-serif;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.echo-page .case-writeup__card {
  background: rgba(62, 18, 12, 0.5);
  border: 1px solid rgba(255, 170, 130, 0.2);
  color: rgba(255, 246, 242, 0.9);
}

body.echo-page .case-writeup__card:hover {
  border-color: rgba(255, 200, 170, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.case-writeup__card-title {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 200, 170, 0.9);
  margin-bottom: 0.65rem;
}

.case-writeup__card p {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 246, 242, 0.88);
}

body.echo-page .echo-writeup .case-writeup__card {
  min-height: 0;
  width: 100%;
  border-radius: calc(var(--radius-sm) + 2px);
}

/* Image lightbox (case study mockups) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(3rem, 6vw);
  box-sizing: border-box;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1280px);
  max-height: 90vh;
  margin: auto;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.lightbox__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.65);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(40, 40, 48, 0.9);
  border-color: rgba(255, 255, 255, 0.55);
}
