/* ==========================================================
   Jaishak J — portfolio
   Brutalist-anime. Two themes, one visual language.
   ========================================================== */

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

/* ===== THEME TOKENS =====
   Semantic, not literal. Every component reads from these,
   so the dark theme is a re-grade, not an inversion. */
:root {
    /* Light: warm paper, hard black ink, highlighter yellow */
    --bg: #E8DCC4;            /* paper */
    --bg-alt: #FFFFFF;        /* alternate section paper */
    --surface: #FFFFFF;       /* cards on --bg sections */
    --surface-alt: #E8DCC4;   /* cards on --bg-alt sections */
    --ink: #000000;           /* borders, headings, structure */
    --text: #000000;
    --text-soft: #333333;
    --text-muted: #666666;
    --accent: #FFE031;        /* highlighter — same in both themes */
    --on-accent: #0D0B08;     /* ink on yellow is ALWAYS near-black */
    --green: #4A7C59;
    --shadow-c: #000000;      /* hard offset shadows */
    --chip-bg: #000000;       /* skill/tech tags */
    --chip-text: #FFFFFF;

    /* Nav is the page's contrast anchor (darkest thing in light mode) */
    --nav-bg: #000000;
    --nav-text: #FFFFFF;
    --nav-chip-bg: #E8DCC4;
    --nav-chip-text: #000000;
    --nav-border: #000000;

    --border-w: 4px;
    --nav-h: 60px;
    --nav-inset: 14px;

    /* Easing tokens — the personality of every animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-brutal:   cubic-bezier(0.7, 0, 0.3, 1);
    --reveal-duration: 0.7s;
}

/* Dark: same mood, re-graded. Warm near-black paper,
   cream ink, yellow untouched. Nav flips to become the
   LIGHTEST element — still the contrast anchor. */
:root.dark {
    --bg: #191510;
    --bg-alt: #1F1A13;
    --surface: #262016;
    --surface-alt: #14100B;
    --ink: #E8DCC4;
    --text: #E8DCC4;
    --text-soft: #CFC4AB;
    --text-muted: #9A8F78;
    --green: #6FA57F;
    --shadow-c: #0A0805;
    --chip-bg: #E8DCC4;
    --chip-text: #191510;

    --nav-bg: #E8DCC4;
    --nav-text: #0D0B08;
    --nav-chip-bg: #0D0B08;
    --nav-chip-text: #E8DCC4;
    --nav-border: #E8DCC4;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + var(--nav-inset) * 2 + 10px);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    /* room for the fixed floating nav */
    padding-top: calc(var(--nav-h) + var(--nav-inset));
}

/* Smooth theme swap for browsers WITHOUT the View Transitions API.
   Applied briefly by JS, then removed so it never fights other motion. */
body.theme-fade,
body.theme-fade * {
    transition: background-color 0.35s ease, color 0.35s ease,
                border-color 0.35s ease, box-shadow 0.35s ease !important;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Grain overlay — inline SVG noise, zero requests ===== */
.grain {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:root.dark .grain { opacity: 0.08; }

/* ===== Skip link ===== */
.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 3000;
    background: var(--accent);
    color: var(--on-accent);
    border: var(--border-w) solid var(--ink);
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 6px 6px 0 var(--shadow-c);
    transition: top 0.2s var(--ease-out-expo);
}

.skip-link:focus { top: 1rem; }

/* ===== Focus states — brutalist, keyboard only ===== */
:focus-visible {
    outline: 4px solid var(--ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 8px var(--accent);
    border-radius: 2px;
}

.nav-links a:focus-visible,
.logo:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
    outline-color: var(--accent);
    box-shadow: none;
}

/* ==========================================================
   FLOATING ROUNDED HEADER
   ========================================================== */
.site-header {
    position: fixed;
    top: var(--nav-inset);
    left: var(--nav-inset);
    right: var(--nav-inset);
    z-index: 1000;
}

.nav-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    height: var(--nav-h);
    background: var(--nav-bg);
    border: 3px solid var(--nav-border);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--shadow-c);
    overflow: hidden; /* clips logo chip + progress bar to the curve */
}

.logo svg {
    width: 170px;
    height: auto;
    display: block;
    color: #111;
}

.logo {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 2px solid #111;
    border-radius: 18px;
    background: #efe2c2;
    color: #f5e6c8;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    padding: 0 2.5rem;
    align-items: center;
    flex: 1;
}

.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    opacity: 0.75;
    transition: opacity 0.25s;
    position: relative;
    padding: 0.3rem 0;
}

.nav-links a:hover { opacity: 1; }

/* Scrollspy state: yellow underline stamps in */
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    transition: right 0.3s var(--ease-out-expo);
}

.nav-links a.active {
    opacity: 1;
}

.nav-links a.active::after { right: 0; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-right: 0.8rem;
}

.cta-btn {
    background: var(--accent);
    color: var(--on-accent);
    border: 2px solid var(--on-accent);
    border-radius: 50px;
    padding: 0.55rem 1.4rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Theme toggle — round chip, icon crossfades */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--nav-chip-bg);
    color: var(--nav-chip-text);
    border: 2px solid var(--nav-border);
    cursor: pointer;
}

.theme-toggle svg { grid-area: 1 / 1; transition: opacity 0.25s, transform 0.4s var(--ease-spring); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root.dark .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }
:root.dark .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

.support-btn{
    background: var(--accent);
    color: var(--on-accent);
    border: 2px solid var(--on-accent);
    border-radius: 12px;
    padding: 0.55rem 1.4rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition:.25s;
}

.support-btn:hover{
    background: #FFE45C;
    transform:translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 216, 61, 0.35);
}

/* Hamburger — hidden on desktop */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: 2px solid var(--nav-text);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.menu-bar {
    width: 18px;
    height: 2.5px;
    background: var(--nav-text);
    transition: transform 0.3s var(--ease-out-expo), opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Yellow scroll progress hugging the nav's bottom edge */
.scroll-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* ==========================================================
   PAGE-LOAD INTRO
   Hero elements hidden until body.is-loaded; title lines
   rise out of clip masks, then badge + card + image follow.
   ========================================================== */
.line-mask {
    display: block;
    overflow: hidden;
}

.line {
    display: inline-block;
}

.load-reveal {
    opacity: 0;
    transform: translateY(110%);
}

.hero-right.load-reveal,
.badge-circle.load-reveal,
.info-card.load-reveal {
    transform: translateY(30px);
}

body.is-loaded .load-reveal {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
}

body.is-loaded .load-reveal[data-load-delay="1"] { transition-delay: 0.08s; }
body.is-loaded .load-reveal[data-load-delay="2"] { transition-delay: 0.16s; }
body.is-loaded .load-reveal[data-load-delay="3"] { transition-delay: 0.26s; }
body.is-loaded .load-reveal[data-load-delay="4"] { transition-delay: 0.36s; }

/* ==========================================================
   TACTILE PRESS SYSTEM
   Hover: lift toward cursor, shadow deepens.
   Active: push down, shadow collapses. Silent but physical.
   ========================================================== */
.press {
    transition:
        transform 0.25s var(--ease-spring),
        box-shadow 0.25s var(--ease-spring);
}

.press:hover {
    transform: translate(-2px, -2px);
}

.press:active {
    transform: translate(2px, 2px);
    transition-duration: 0.08s;
}

/* Shadow depths per component (hover deepens, active collapses) */
.info-card.press:hover,
.project-card-large.press:hover          { box-shadow: 11px 11px 0 var(--shadow-c); }
.info-box.press:hover,
.skill-category.press:hover,
.contact-card.press:hover                { box-shadow: 9px 9px 0 var(--shadow-c); }

.info-card.press:active,
.project-card-large.press:active,
.info-box.press:active,
.skill-category.press:active,
.contact-card.press:active               { box-shadow: 2px 2px 0 var(--shadow-c); }

.cta-btn.press:hover,
.download-btn.press:hover,
.project-link.press:hover,
.theme-toggle.press:hover                { box-shadow: 4px 4px 0 var(--shadow-c); }

.cta-btn.press:active,
.download-btn.press:active,
.project-link.press:active,
.theme-toggle.press:active               { box-shadow: 0 0 0 var(--shadow-c); }

/* ===== Scroll reveal system (shadow "lands" on arrival) =====
   NOTE: base .reveal must stay a single-class selector. If it were
   prefixed (e.g. `html.js .reveal`) its specificity would exceed
   `.reveal.is-visible` and content would never un-hide. */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity var(--reveal-duration) var(--ease-out-expo),
        transform var(--reveal-duration) var(--ease-out-expo),
        box-shadow var(--reveal-duration) var(--ease-out-expo);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.12s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.24s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.36s; }

.info-box.reveal:not(.is-visible),
.skill-category.reveal:not(.is-visible),
.project-card-large.reveal:not(.is-visible),
.contact-card.reveal:not(.is-visible) {
    box-shadow: 0 0 0 var(--shadow-c);
}

/* ==========================================================
   MARQUEE — the one loud element
   ========================================================== */
.marquee {
    background: var(--ink);
    border-top: var(--border-w) solid var(--ink);
    border-bottom: var(--border-w) solid var(--ink);
    overflow: hidden;
    padding: 0.9rem 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee-track span {
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.12em;
    color: var(--bg);
    white-space: nowrap;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ===== Animated SVG section dividers ===== */
.section-divider {
    line-height: 0;
    background: var(--bg-alt);
}

.section-divider svg { width: 100%; height: 60px; display: block; }

.section-title{
    display:flex;
    align-items:center;
    gap:12px;
}

.section-icon{
    width:28px;
    height:28px;
    color:#111;
    flex-shrink:0;
}

.divider-path { stroke: var(--ink); }

.divider-path.is-drawn {
    animation: drawPath 1.2s var(--ease-brutal) forwards;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
    padding: 4rem 2rem;
    min-height: calc(90vh - var(--nav-h));
    background: var(--bg);
}

.hero-container { max-width: 1400px; margin: 0 auto; }

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.hero-left { flex: 1; max-width: 700px; }
.hero-right { flex-shrink: 0; width: 400px; }

.hero-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    margin-bottom: 3rem;
    text-transform: uppercase;
    color: var(--ink);
}

.highlight { font-style: italic; }

/* Rotating Badge */
.badge-circle {
    width: 200px;
    height: 200px;
    position: relative;
    margin-bottom: 3rem;
}

.badge-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 20s linear infinite;
}

.badge-ring-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    fill: var(--ink);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.badge-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--chip-bg);
    color: var(--chip-text);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info Card */
.info-card {
    background: var(--surface);
    border: var(--border-w) solid var(--ink);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 8px 8px 0 var(--shadow-c);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-icon { font-size: 1.5rem; }
.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-icon-svg {
    width: 22px;
    height: 22px;
    color: var(--black);
    flex-shrink: 0;
}

.card-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-soft);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-btn {
    background: var(--accent);
    border: 2px solid var(--on-accent);
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    color: var(--on-accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.arrow { font-size: 1.2rem; }

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.location-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

/* Hero Image */
.image-card {
    position: relative;
    border-radius: 20px;
    border: var(--border-w) solid var(--ink);
    overflow: hidden;
    background: var(--surface);
    box-shadow: 8px 8px 0 var(--shadow-c);
}

.main-card { height: 500px; }

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.star-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--on-accent);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid var(--on-accent);
}

/* ===== Flip Card ===== */
.flip-card { cursor: pointer; padding: 0; overflow: hidden; }

.flip-inner { position: relative; min-height: 260px; }

.flip-face {
    padding: 2rem;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s ease, color 0.6s ease;
}

.flip-front { position: relative; opacity: 1; transform: translateY(0); }
.flip-back {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    background: #14120f;
    color: #f2ede0;
    border-radius: 16px;
}

.flip-card.is-flipped .flip-front {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.flip-card.is-flipped .flip-back {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

.flip-card.is-flipped { background: #14120f; border-color: #FFE031; }

.flip-back .card-icon-svg { color: #FFE031; transition: transform 0.5s ease; }
.flip-card.is-flipped .card-icon-svg { transform: rotate(8deg) scale(1.1); }

.flip-back .card-label { color: #FFE031; }

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.2rem 0;
}

.stat-pill {
    background: var(--black);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-live { background: #1a7a3d; }

.dev-quote { font-weight: 600; margin-bottom: 0.8rem; }
.dev-quote-sub { color: #b8b0a0; font-size: 0.9rem; margin-bottom: 1.2rem; }

.terminal-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
}

.term-badge {
    background: #0a0a08;
    border: 1px solid #FFE031;
    color: #FFE031;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    width: fit-content;
}

.term-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: #FFE031;
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.flip-hint {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
    .flip-face, .flip-card { transition: none !important; }
}
/* ==========================================================
   SECTIONS
   ========================================================== */
.education-section { padding: 5rem 2rem; background: var(--bg); }
.projects-section  { padding: 5rem 2rem; background: var(--bg); }
.contact-section   { padding: 5rem 2rem; background: var(--bg-alt); }

.section-container { max-width: 1400px; margin: 0 auto; }

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--ink);
}

.title-underline {
    width: 100px;
    height: 5px;
    background: var(--accent);
    margin: 0 auto;
}

/* Education / Experience */
.education-experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-box {
    background: var(--accent);
    color: var(--on-accent);
    border: var(--border-w) solid var(--on-accent);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 6px 6px 0 var(--shadow-c);
}

.info-number {
    position: absolute;
    top: -20px;
    left: 2rem;
    background: var(--on-accent);
    color: var(--accent);
    border: 2px solid var(--on-accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.info-box h3 {
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.info-box p {
    line-height: 1.8;
    color: var(--on-accent);
    opacity: 0.85;
}

/* Skills */

/* ===== Tech Stack Table ===== */
.stack-table {
    display: flex;
    flex-direction: column;
    border: var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 8px 8px 0 var(--black);
    background: var(--white);
}

.stack-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    border-bottom: 2px solid var(--black);
    position: relative;
    transition: background 0.3s ease;
}

.stack-row:last-child { border-bottom: none; }

.stack-row:not(.stack-head)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--yellow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.stack-row:not(.stack-head):hover::before { opacity: 0.15; }
.stack-row:not(.stack-head):hover { background: var(--cream); }

.stack-head {
    background: var(--black);
    color: var(--white);
}

.stack-head .stack-domain,
.stack-head .stack-techs {
    font-family: 'Anton', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    padding: 1.1rem 1.5rem;
}

.stack-domain {
    font-family: 'Anton', sans-serif;
    font-size: 1.15rem;
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    border-right: 2px solid var(--black);
    background: var(--cream);
}

.stack-domain {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.domain-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--black);
}

.stack-techs {
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--black);
    color: var(--white);
    padding: 0.5rem 1rem 0.5rem 0.6rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.tech-pill svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tech-pill:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: var(--pill, var(--yellow));
    box-shadow: 0 6px 0 rgba(0,0,0,0.15), 0 0 14px var(--pill, var(--yellow));
}

@media (max-width: 768px) {
    .stack-row { grid-template-columns: 1fr; }
    .stack-domain { border-right: none; border-bottom: 2px solid var(--black); }
    .stack-head .stack-domain { display: none; }
}

.proficiency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.6rem;
    margin-bottom: 3rem;
}

.prof-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.prof-pct { color: var(--yellow-dark, #b38f00); }

.prof-track {
    height: 12px;
    background: var(--black);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--black);
}

.prof-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(90deg, var(--yellow) 0 8px, #000 8px 9px);
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.proficiency-grid.is-visible .prof-fill { width: var(--pct); }

/* Projects */
.projects-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.projects-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card-large {
    background: var(--surface);
    border: var(--border-w) solid var(--ink);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    box-shadow: 8px 8px 0 var(--shadow-c);
}

.project-badge {
    position: absolute;
    top: -15px;
    left: 2rem;
    background: var(--accent);
    color: var(--on-accent);
    border: 2px solid var(--on-accent);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.project-card-large h3 {
    font-family: 'Anton', sans-serif;
    font-size: 2.5rem;
    margin: 1rem 0 1.5rem;
    color: var(--ink);
}

.project-card-large p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-soft);
}

.tech-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tech-tag {
    background: var(--chip-bg);
    color: var(--chip-text);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--on-accent);
    text-decoration: none;
    padding: 1rem 2rem;
    border: 2px solid var(--on-accent);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.coming-soon-card {
    background: var(--surface-alt);
    border: 3px dashed var(--ink);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
}

.coming-soon-card h3 {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

.coming-soon-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.project-side-image-circle {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: var(--border-w) solid var(--ink);
    overflow: hidden;
    background: var(--surface);
    box-shadow: 8px 8px 0 var(--shadow-c);
    position: sticky;
    top: calc(var(--nav-h) + var(--nav-inset) * 2 + 20px);
}

.rotating-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--cream);
    border: var(--border);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    box-shadow: 6px 6px 0 var(--black);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: var(--card-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 var(--black);
}

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

.contact-icon-tile {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-accent);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.15);
}

.contact-icon-tile svg {
    width: 26px;
    height: 26px;
}

.contact-text h4 {
    font-family: 'Anton', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    color: var(--black);
}

.contact-text span {
    font-size: 0.82rem;
    color: #444;
    word-break: break-word;
}

/* Footer */
footer {
    background: var(--ink);
    color: var(--bg);
    padding: 2rem;
    text-align: center;
}

.footer-container p {
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ==========================================================
   CUSTOM CURSOR — cream ring, difference blend.
   Adapts to every surface and both themes automatically.
   ========================================================== */
.custom-cursor {
    width: 36px;
    height: 36px;
    border: 2px solid #E8DCC4;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.2s ease, height 0.2s ease;
    will-change: transform;
}

.custom-cursor-dot {
    width: 5px;
    height: 5px;
    background: #E8DCC4;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: width 0.2s ease, height 0.2s ease;
    will-change: transform;
}

body.cursor-grow .custom-cursor     { width: 56px; height: 56px; }
body.cursor-grow .custom-cursor-dot { width: 14px; height: 14px; }

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
    cursor: none;
}

/* ==========================================================
   REDUCED MOTION — kill everything, show everything
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .load-reveal,
    body:not(.is-loaded) .load-reveal {
        opacity: 1;
        transform: none;
    }

    .marquee-track { animation: none; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 968px) {
    :root { --nav-inset: 10px; }

    .hero-content { flex-direction: column; }
    .hero-right { width: 100%; }
    .hero-title { font-size: 3rem; }

    /* Mobile menu: links drop into a panel inside the pill */
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--nav-h);
    }

    .logo { height: var(--nav-h); border-right: none; }

    .nav-actions {
        margin-left: auto;
        height: var(--nav-h);
    }

    .menu-toggle { display: flex; }

    .nav-links {
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--ease-out-expo);
    }

    .nav-links.open {
        max-height: 320px;
        border-top: 3px solid var(--nav-border);
    }

    .nav-links a {
        font-family: 'Anton', sans-serif;
        font-size: 1.1rem;
        letter-spacing: 0.08em;
        padding: 0.9rem 2rem;
        opacity: 1;
    }

    .nav-links a.active { background: var(--accent); color: var(--on-accent); }
    .nav-links a::after { display: none; }

    .skills-grid-main,
    .education-experience-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-layout { grid-template-columns: 1fr; }

    .project-side-image-circle {
        position: relative;
        top: 0;
        margin: 0 auto;
    }
}

.project-pill{
    text-decoration:none;
    transition:.25s ease;
    cursor:pointer;
}

.project-pill:hover{
    transform:translateY(-2px);
    background:#FFD84D;
    color:#000;
    box-shadow:0 6px 16px rgba(0,0,0,.18);
}

.view-projects-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:28px;
    padding:14px 34px;
    background:#FFD84D;
    color:#000;
    border:2px solid #111;
    border-radius:999px;
    font-weight:700;
    text-decoration:none;
    transition:.25s ease;
}

.view-projects-btn:hover{
    transform:translateY(-3px);
    box-shadow:6px 6px 0 #000;
}

.view-projects-btn:active{
    transform:translateY(0);
    box-shadow:3px 3px 0 #000;
}

.more-projects-card{
    display:block;
    text-decoration:none;
    color:inherit;

    margin:60px 0;
    padding:45px;

    background:var(--card-bg);
    border:4px dashed #111;
    border-radius:28px;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease,
        background .25s ease;

    cursor:pointer;
}

.more-projects-card:hover{
    transform:translateY(-6px);
    box-shadow:10px 10px 0 #111;
    border-color:#f5c400;
}

.more-projects-content{
    text-align:center;
}

.more-projects-content h3{
    font-size:2.4rem;
    margin-bottom:16px;
}

.more-projects-content p{
    max-width:700px;
    margin:0 auto 24px;
    font-size:1.05rem;
    line-height:1.7;
}

.more-projects-link{
    display:inline-flex;
    align-items:center;
    gap:8px;

    padding:14px 30px;

    background:#FFD84D;
    border:2px solid #111;
    border-radius:999px;

    font-weight:700;

    transition:.25s;
}

.more-projects-card:hover .more-projects-link{
    transform:translateX(6px);
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }
    .badge-circle { width: 150px; height: 150px; }
    .badge-btn { width: 90px; height: 90px; }
    .project-side-image-circle { width: 280px; height: 280px; }
    .cta-btn { padding: 0.55rem 1rem; }
    .marquee-track span { font-size: 1.1rem; }
}

/* ===========================
        LOADER
=========================== */

#loader{
    position:fixed;
    inset:0;
    background:#050505;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
}

#loader-text{
    font-size:clamp(42px,6vw,90px);
    color:white;
    font-weight:700;
    letter-spacing:-0.03em;
    line-height:1;
}
.char{
    display:inline-block;
}

.hide-loader{
    opacity:0;
    pointer-events:none;
}

/* ---------- sound toggle ---------- */
#sound-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 10px 16px;
    border: 2px solid var(--black);
    color: var(--black);
    background: var(--cream);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--black);
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

#sound-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--black);
}

#sound-toggle.on {
    background: var(--yellow);
}
