/* ================================================================
   DR. BALAKRISHNA SOORALI - PORTFOLIO
   Apple-inspired design system v3.0
   Clean, spacious, refined. Desktop + Tablet + Mobile.
   ================================================================ */

/* ---------- design tokens ---------- */
:root {
    color-scheme: dark;
    --font-display: -apple-system, "SF Pro Display", "Montserrat", "Helvetica Neue", sans-serif;
    --font-ui: -apple-system, "SF Pro Text", "Montserrat", "Helvetica Neue", sans-serif;
    --font-body: -apple-system, "SF Pro Text", "Titillium Web", "Helvetica Neue", sans-serif;

    --bg:            #000000;
    --bg-soft:       #111111;
    --surface:       rgba(28, 28, 30, 0.72);
    --surface-strong: rgba(28, 28, 30, 0.92);
    --line:          rgba(255, 255, 255, 0.08);
    --line-highlight: rgba(255, 255, 255, 0.16);
    --text:          #f5f5f7;
    --text-secondary:#a1a1a6;
    --muted:         #86868b;
    --accent:        #2997ff;
    --accent-strong: #0071e3;
    --accent-alt:    #30d158;
    --accent-glow:   rgba(41, 151, 255, 0.25);
    --alt-glow:      rgba(48, 209, 88, 0.20);
    --shadow:        0 20px 60px rgba(0, 0, 0, 0.50);
    --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.30);
    --radius:        20px;
    --radius-small:  14px;
    --container:     min(1120px, calc(100vw - 3rem));
    --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring:   cubic-bezier(0.28, 1.4, 0.64, 1);
}

@font-face {
    font-family: "Futura PT";
    src: local("Futura PT"), local("FuturaPT-Medium"), local("FuturaPT Book"), local("Futura PT Medium");
    font-display: swap;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg:            #ffffff;
    --bg-soft:       #f5f5f7;
    --surface:       rgba(255, 255, 255, 0.80);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --line:          rgba(0, 0, 0, 0.06);
    --line-highlight: rgba(0, 0, 0, 0.12);
    --text:          #1d1d1f;
    --text-secondary:#6e6e73;
    --muted:         #86868b;
    --accent:        #0071e3;
    --accent-strong: #0058b9;
    --accent-alt:    #1ea34d;
    --accent-glow:   rgba(0, 113, 227, 0.18);
    --alt-glow:      rgba(30, 163, 77, 0.14);
    --shadow:        0 16px 48px rgba(0, 0, 0, 0.10);
    --shadow-card:   0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { border: 0; background: none; cursor: pointer; }
img, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }

/* ---------- background treatment ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 70% 50% at 25% 0%, var(--accent-glow), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 0%, var(--alt-glow), transparent 60%),
        var(--bg);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 50% 50% at center, black, transparent 75%);
    opacity: 0.15;
    pointer-events: none;
}

/* ---------- cursor glow ---------- */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 500ms ease;
    mix-blend-mode: screen;
}

body:hover .cursor-glow { opacity: 0.25; }

/* ---------- layout ---------- */
.container {
    width: var(--container);
    margin: 0 auto;
}

/* ---------- navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 400ms ease;
}

.site-header.scrolled {
    box-shadow: 0 0.5px 0 var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.1rem;
    transition: opacity 200ms ease;
}

.brand:hover { opacity: 0.7; }

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--accent);
    color: #ffffff;
    transition: transform 300ms var(--ease-spring);
}

.brand:hover .brand-mark {
    transform: scale(1.06);
}

.brand-copy {
    font-size: 0.9rem;
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-menu > a {
    position: relative;
    padding: 0.5rem 0.7rem;
    color: var(--muted);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: -0.003em;
    transition: color 250ms ease;
    border-radius: 8px;
}

.nav-menu > a:hover,
.nav-menu > a:focus-visible,
.nav-menu > a.active {
    color: var(--text);
}

.nav-menu > a::after {
    content: "";
    position: absolute;
    bottom: 0.05rem;
    left: 50%;
    width: 0;
    height: 1.5px;
    border-radius: 999px;
    background: var(--accent);
    transition: width 300ms var(--ease-out), left 300ms var(--ease-out);
}

.nav-menu > a:hover::after,
.nav-menu > a.active::after {
    width: 50%;
    left: 25%;
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    border: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    transition: opacity 200ms ease;
}

.nav-toggle:hover { opacity: 0.6; }

.nav-toggle span {
    width: 18px;
    height: 1.5px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 300ms var(--ease-out), opacity 200ms ease;
    transform-origin: center;
}

.nav-menu.is-open ~ .nav-toggle span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-menu.is-open ~ .nav-toggle span:last-child  { transform: translateY(-2.75px) rotate(-45deg); }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: none;
    color: var(--muted);
    background: transparent;
    font-family: var(--font-ui);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 200ms ease, opacity 200ms ease;
}

.theme-toggle:hover {
    color: var(--text);
    opacity: 0.7;
}

/* ---------- buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 1.25rem;
    border-radius: 980px;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    transition: all 300ms var(--ease-out);
}

.button:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.button:active {
    transform: scale(0.98);
}

.button-solid {
    background: var(--accent);
    color: #ffffff;
    border: none;
}

.button-solid:hover {
    background: var(--accent-strong);
}

.button-ghost {
    border: 1px solid var(--line-highlight);
    background: transparent;
    color: var(--accent);
}

.button-ghost:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-color: var(--accent);
}

.button-accent {
    background: var(--accent-alt);
    color: #ffffff;
    border: none;
}

.button-accent:hover {
    filter: brightness(1.15);
}

/* ---------- hero section ---------- */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    min-height: calc(100vh - 52px);
    display: grid;
    align-items: center;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 4rem;
    align-items: center;
}

.eyebrow,
.mini-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-ui);
    font-weight: 600;
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 1.5px;
    border-radius: 999px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero h1,
.section-heading h2,
.support-banner h2,
.contact-copy h2 {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
    line-height: 1.06;
    font-weight: 700;
}

.hero h1 {
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    max-width: 18ch;
    color: var(--text);
}

.hero-summary {
    max-width: 52ch;
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2.5rem 0;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

/* ---------- shared card system ---------- */
.glass-card,
.hero-metrics article,
.skill-card,
.project-card,
.service-card,
.support-banner,
.contact-form,
.contact-copy {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    transition: transform 500ms var(--ease-out), box-shadow 400ms ease, border-color 300ms ease;
}

.skill-card:hover,
.service-card:hover,
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--line-highlight);
}

.hero-metrics article,
.skill-card,
.service-card,
.contact-copy,
.contact-form {
    padding: 1.5rem;
    border-radius: var(--radius-small);
}

.hero-metrics article {
    text-align: center;
    transition: transform 400ms var(--ease-out), box-shadow 300ms ease;
}

.hero-metrics article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-metrics strong {
    display: block;
    font-size: 2.2rem;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--accent);
}

.hero-metrics span,
.hero-card p,
.hero-focus-list span,
.section-heading p,
.about-story p,
.skill-card p,
.timeline-body p,
.project-content p,
.service-card p,
.support-banner p,
.contact-copy p,
.form-helper {
    color: var(--muted);
}

.hero-metrics span { font-size: 0.82rem; line-height: 1.48; }

/* ---------- hero right panel ---------- */
.hero-panel {
    display: grid;
    gap: 1.25rem;
    justify-items: end;
}

.hero-portrait-frame {
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
    width: min(100%, 320px);
    position: relative;
}

.hero-portrait-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius) + 1px);
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    z-index: -1;
    opacity: 0;
    transition: opacity 600ms ease;
}

.hero-portrait-frame:hover::before {
    opacity: 0.6;
}

.hero-portrait {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 800ms var(--ease-out);
}

.hero-portrait-frame:hover .hero-portrait {
    transform: scale(1.03);
}

.hero-portrait-caption {
    display: grid;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.hero-card {
    padding: 1.25rem;
    border-radius: var(--radius);
}

.hero-side-note {
    background: var(--surface-strong);
    width: min(100%, 320px);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-alt) 12%, transparent);
    color: var(--text);
    font-size: 0.8rem;
    font-family: var(--font-ui);
    border: 1px solid color-mix(in srgb, var(--accent-alt) 18%, transparent);
}

.status-pill span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent-alt);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-alt) 16%, transparent);
    animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-alt) 16%, transparent); }
    50%      { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-alt) 6%, transparent); }
}

.hero-card-top {
    display: grid;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.hero-focus-list {
    display: grid;
    gap: 0.85rem;
    padding-top: 1rem;
}

.hero-focus-list span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-family: var(--font-ui);
    font-weight: 600;
}

.hero-focus-list strong {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
}

/* tags */
.skill-tags span {
    padding: 0.35rem 0.65rem;
    border-radius: 980px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 500;
    transition: border-color 200ms ease, color 200ms ease;
}

.skill-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1.5px solid var(--line-highlight);
    display: grid;
    place-items: start center;
    padding-top: 0.35rem;
    transition: border-color 300ms ease;
}

.scroll-cue:hover { border-color: var(--accent); }

.scroll-cue span {
    width: 2px;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--accent);
    animation: float-down 2s infinite;
}

/* ---------- visual story ---------- */
.visual-story { padding-top: 2rem; }

.visual-story-grid {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 3rem;
    align-items: center;
}

.visual-story-copy { padding-right: 1.5rem; }

.visual-story-gallery {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.75rem;
}

.story-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    background: var(--surface);
    transition: transform 600ms var(--ease-out);
}

.story-art:hover {
    transform: scale(1.02);
}

.story-art-large {
    grid-row: 1 / span 2;
    min-height: 32rem;
}

/* ---------- sections ---------- */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-heading {
    max-width: 50rem;
    margin-bottom: 3.5rem;
}

.section-heading h2,
.support-banner h2,
.contact-copy h2 {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    line-height: 1.08;
}

.section-heading p {
    margin-top: 1rem;
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 60ch;
}

/* ---------- about ---------- */
.about-layout,
.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
}

.about-story {
    display: grid;
    gap: 1.25rem;
}

.about-story p {
    font-size: 1.05rem;
    line-height: 1.72;
}

.about-cards { display: grid; gap: 1rem; }

.about-card {
    padding: 1.5rem;
    border-radius: var(--radius-small);
    transition: transform 400ms var(--ease-out), box-shadow 400ms ease;
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.about-card h3,
.skill-head h3,
.project-content h3,
.service-card h3,
.timeline-body h3,
.contact-copy h2,
.support-banner h2 {
    margin-top: 0;
    font-family: var(--font-display);
    font-weight: 700;
}

.about-card ul,
.project-content ul,
.publication-list,
.footer-links {
    margin: 0;
    padding: 0;
}

.about-card li,
.project-content li,
.publication-list li {
    list-style: none;
    position: relative;
    padding-left: 1.1rem;
    margin-top: 0.65rem;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.about-card li::before,
.project-content li::before,
.publication-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- skills ---------- */
.skills-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.skill-card,
.service-card {
    border-radius: var(--radius-small);
    overflow: hidden;
}

.skill-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms var(--ease-out);
}

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

.skill-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

.skill-glyph {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    transition: transform 400ms var(--ease-spring);
}

.skill-card:hover .skill-glyph {
    transform: scale(1.08);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

/* ---------- timeline ---------- */
.timeline {
    position: relative;
    display: grid;
    gap: 1rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--line-highlight), var(--line-highlight), transparent);
}

.timeline-item {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 2rem;
    align-items: start;
}

.timeline-date {
    position: sticky;
    top: 4rem;
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-body {
    padding: 1.5rem;
    border-radius: var(--radius-small);
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
    transition: transform 400ms var(--ease-out), box-shadow 400ms ease;
}

.timeline-body:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.timeline-body::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 1.6rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--bg);
}

.timeline-company {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.88rem;
}

.education-publications {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.education-publications article {
    padding: 1.5rem;
    border-radius: var(--radius-small);
}

/* ---------- writing / articles ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.article-card {
    padding: 1.5rem;
    border-radius: var(--radius-small);
    display: grid;
    gap: 0.65rem;
    transition: transform 400ms var(--ease-out), box-shadow 400ms ease, border-color 300ms ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--line-highlight);
}

.article-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms var(--ease-out);
}

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

.article-meta {
    display: flex;
    gap: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    font-weight: 600;
    margin: 0;
}

.article-card h3 a {
    color: var(--text);
    transition: color 250ms ease;
}

.article-card h3 a:hover {
    color: var(--accent);
}

.article-card > p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.article-tags span {
    padding: 0.25rem 0.55rem;
    border-radius: 980px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 500;
}

.article-card .article-thumb {
    width: 100%;
    height: 9rem;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin-bottom: 0.2rem;
}

.writing-cta {
    margin-top: 2.5rem;
    text-align: center;
}

/* ---------- projects ---------- */
.project-grid { display: grid; gap: 1rem; }

.project-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.project-visual {
    min-height: 18rem;
    background: var(--bg-soft);
    overflow: hidden;
}

.project-visual img {
    width: 100%;
    height: 100%;
    min-height: 18rem;
    object-fit: cover;
    transition: transform 700ms var(--ease-out);
}

.project-card:hover .project-visual img {
    transform: scale(1.04);
}

.project-content { padding: 2rem; }

.project-label {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------- services ---------- */
.services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card { overflow: hidden; }

.service-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms var(--ease-out);
}

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

.service-card > span {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    transition: transform 300ms var(--ease-spring);
}

.service-card:hover > span {
    transform: scale(1.06);
}

/* ---------- support ---------- */
.support-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 2.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ---------- contact ---------- */
.contact-grid { align-items: stretch; }

.contact-copy,
.contact-form {
    border-radius: var(--radius);
    padding: 2rem;
}

.contact-points {
    display: grid;
    gap: 0.65rem;
    margin-top: 2rem;
}

.contact-points a {
    color: var(--accent);
    font-weight: 600;
    transition: opacity 200ms ease;
}

.contact-points a:hover { opacity: 0.7; }

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
    color: var(--text);
    resize: vertical;
    font-size: 0.92rem;
    transition: border-color 250ms ease, box-shadow 250ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.form-status {
    min-height: 1.5rem;
    margin: 0;
    color: var(--accent-alt);
    font-family: var(--font-ui);
    font-size: 0.82rem;
}

/* ---------- footer ---------- */
.site-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--line);
}

.footer-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.brand-footer {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.footer-links a,
.back-top {
    color: var(--muted);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.82rem;
    transition: color 200ms ease;
}

.footer-links a:hover,
.back-top:hover {
    color: var(--text);
}

.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;
}

/* ---------- animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

.reveal[data-animate="left"] {
    transform: translateX(30px);
}

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

@keyframes float-down {
    0%   { transform: translateY(0); opacity: 1; }
    60%  { transform: translateY(0.8rem); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   RESPONSIVE: TABLET (768px - 1080px)
   ============================================================ */
@media (max-width: 1080px) {
    :root {
        --container: min(1120px, calc(100vw - 2rem));
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero h1 {
        font-size: clamp(2.4rem, 5vw, 3.6rem);
    }

    .hero-panel {
        justify-items: start;
    }

    .hero-portrait-frame,
    .hero-side-note {
        width: min(100%, 340px);
    }

    .visual-story-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .visual-story-copy {
        padding-right: 0;
    }

    .visual-story-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .story-art-large {
        grid-row: auto;
        min-height: 20rem;
    }

    .about-layout,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .project-visual {
        min-height: 14rem;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .education-publications {
        grid-template-columns: 1fr;
    }

    .support-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .section {
        padding: 6rem 0;
    }
}

/* ============================================================
   RESPONSIVE: LARGE TABLET / SMALL LAPTOP (769px - 1080px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1080px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 2.5rem;
    }

    .hero-panel {
        justify-items: end;
    }

    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --container: calc(100vw - 2rem);
        --radius: 16px;
        --radius-small: 12px;
    }

    body {
        font-size: 16px;
    }

    .nav-toggle { display: inline-flex; }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 1rem;
        left: 1rem;
        padding: 1rem;
        border-radius: 16px;
        background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        backdrop-filter: blur(24px) saturate(1.8);
        -webkit-backdrop-filter: blur(24px) saturate(1.8);
        display: grid;
        gap: 0.25rem;
        transform-origin: top right;
        transform: scale(0.97) translateY(-6px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms var(--ease-out), transform 300ms var(--ease-spring);
    }

    .nav-menu.is-open {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

    .nav-menu > a {
        padding: 0.65rem 0.75rem;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    .nav-menu > a:hover {
        background: color-mix(in srgb, var(--accent) 8%, transparent);
    }

    .nav-menu > a::after { display: none; }

    .button-nav { width: 100%; }

    .hero {
        padding: 3rem 0 3.5rem;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 3rem);
        max-width: 100%;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .hero-panel {
        justify-items: start;
    }

    .hero-portrait-frame,
    .hero-side-note {
        width: 100%;
        max-width: 320px;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hero-metrics article {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
        text-align: left;
        align-items: center;
    }

    .hero-metrics strong {
        font-size: 1.8rem;
    }

    .visual-story-grid {
        grid-template-columns: 1fr;
    }

    .visual-story-gallery {
        grid-template-columns: 1fr;
    }

    .story-art,
    .story-art-large {
        min-height: 14rem;
    }

    .section {
        padding: 4.5rem 0;
    }

    .section-heading {
        margin-bottom: 2.5rem;
    }

    .section-heading h2,
    .support-banner h2,
    .contact-copy h2 {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .skills-grid,
    .services-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .about-layout,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-visual,
    .project-visual img {
        min-height: 12rem;
    }

    .project-visual {
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .project-content {
        padding: 1.5rem;
    }

    .timeline::before { display: none; }
    .timeline-body::before { display: none; }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .timeline-date {
        position: static;
        font-size: 0.72rem;
    }

    .education-publications {
        grid-template-columns: 1fr;
    }

    .support-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.75rem;
    }

    .contact-copy,
    .contact-form {
        padding: 1.5rem;
    }

    .footer-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .scroll-cue { bottom: 1.25rem; }

    .cursor-glow { display: none; }
}

/* ============================================================
   RESPONSIVE: SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    :root {
        --container: calc(100vw - 1.5rem);
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8.5vw, 2.5rem);
    }

    .hero-summary {
        font-size: 0.92rem;
    }

    .button {
        min-height: 2.5rem;
        padding: 0 1rem;
        font-size: 0.84rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .section-heading h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .nav {
        min-height: 48px;
    }

    .brand-copy {
        font-size: 0.8rem;
    }

    .hero-portrait-frame,
    .hero-side-note {
        max-width: 100%;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0ms !important;
    }

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

    .cursor-glow { display: none; }
}
