:root {
    --theme-hue: 250;
    --theme-saturation: 100%;
    /* Emerald Palette (Primary Action / Brand Identity - H=154) */
    --ws-indigo-deep:   hsl(250, 72%, 24%);  /* WCAG AAA vs white */
    --ws-indigo-mid:    hsl(250, 72%, 35%);  /* WCAG AAA vs white */
    --ws-indigo-soft:   hsl(250, 65%, 72%);  /* Decorative borders */
    --ws-indigo-subtle: hsl(250, 60%, 96%);  /* Surface backgrounds & tag pills */
    /* Teal Palette (+30° Analogous Accent - H=184) */
    --ws-orchid-deep:      hsl(280, 72%, 22%);  /* WCAG AAA vs white */
    --ws-orchid-mid:       hsl(280, 65%, 32%);  /* WCAG AA vs white */
    --ws-orchid-soft:      hsl(280, 50%, 72%);  /* Accent lines */
    --ws-orchid-subtle:    hsl(280, 60%, 96%);  /* Alert / secondary backgrounds */
    /* Sage Palette (-30° Analogous Accent - H=124) */
    --ws-blue-deep:      hsl(220, 65%, 25%);
    --ws-blue-mid:       hsl(220, 60%, 35%);
    --ws-blue-soft:      hsl(220, 50%, 70%);
    --ws-blue-subtle:    hsl(220, 60%, 97%);
    /* Amber Palette (Triadic Warm Accent - H=40) */
    --ws-coral-deep:     hsl(15, 85%, 28%);   /* WCAG AAA vs white */
    --ws-coral-mid:      hsl(15, 78%, 38%);   /* WCAG AA vs white */
    --ws-coral-subtle:   hsl(15, 80%, 96%);   /* Warning block surfaces */
    /* Neutrals & Semantic Colors - Light Mode Default */
    --color-bg-base: #ffffff;
    --color-bg-surface: var(--ws-blue-subtle);
    --color-text: hsl(0, 0%, 5%);             /* Body text: 18:1 contrast vs white */
    --color-text-muted: hsl(0, 0%, 35%);
    --color-border: color-mix(in srgb, var(--ws-indigo-deep) 15%, rgba(0,0,0,0.1));
    --color-shadow: rgba(0, 0, 0, 0.08);
    /* Acrylic & Material Layering Settings */
    --acrylic-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    --glass-blur: blur(12px) saturate(160%);
    --radius-lg: 1rem;
    --radius-md: 0.5rem;
    --transition-interactive: background-color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                              color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                              border-color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                              box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                              transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --acrylic-bg-2: color-mix(in srgb, var(--ws-indigo-deep) 9%, #ffffff);
    --acrylic-border-2: 1px solid color-mix(in srgb, var(--ws-indigo-deep) 32%, var(--color-border));
    
    /* Inset box-shadow: top highlight (white reflection), bottom weight shadow */
    --acrylic-shadow-2: 0 8px 24px -6px var(--color-shadow), 
                         inset 0 1px 0 0 rgba(255, 255, 255, 0.95), 
                         inset 0 -1px 0 0 rgba(0, 0, 0, 0.10);
    /* Layout metrics */
    --site-header-height: 80px;
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 4rem;     /* 64px */
    --space-2xl: 6rem;    /* 96px */
}
/* --- Base & Reset Elements --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    background-color: var(--color-bg-base);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}
/* Depth Layers (L0 to L4) */
.layer-l0 {
    background-color: var(--color-bg-base);
}
.layer-l1 {
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
/* Typography System */
h1, h2, h3, h4 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}
h1 { font-size: clamp(2.25rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
p {
    font-size: 1.05rem;
    line-height: 1.65;
    letter-spacing: -0.011em;
    max-width: 65ch;
    margin-bottom: var(--space-lg);
    color: var(--color-text-muted);
}
/* Container Structure */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
section {
    padding: var(--space-xl) 0;
}
/* Anchor clearance offset */
section[id] {
    scroll-margin-top: var(--site-header-height);
}
/* Acrylic card structure (L2) */
.acrylic-card {
    padding: var(--space-lg);
    background: var(--acrylic-bg-2);
    background-image: var(--acrylic-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--acrylic-border-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--acrylic-shadow-2);
    transition: var(--transition-interactive);
    position: relative;
    overflow: hidden;
}
.acrylic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), color-mix(in srgb, var(--ws-indigo-soft) 12%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.acrylic-card:hover::before {
    opacity: 1;
}
.acrylic-card > * {
    position: relative;
    z-index: 2;
}
.acrylic-card:hover {
    transform: translateY(-4px);
    border-color: var(--ws-indigo-soft);
    box-shadow: 0 16px 36px -8px var(--color-shadow), 
                inset 0 1px 0 0 rgba(255, 255, 255, 0.98);
}

/* Custom skill pills */
.skill-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ws-indigo-deep);
    background: var(--ws-indigo-subtle);
    border: 1px solid var(--ws-indigo-soft);
    border-radius: 2rem;
    transition: var(--transition-interactive);
    position: relative;
    z-index: 5;
}
.skill-pill:hover {
    background: var(--ws-indigo-soft);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px -2px var(--color-shadow);
}

/* Competency cards horizontal slide hover */
.competency-pillar-card:hover {
    transform: translateX(6px) !important;
    border-color: var(--ws-indigo-soft);
}
/* --- Header / Navigation (L3 Depth) --- */
.site-header {
    height: var(--site-header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: color-mix(in srgb, var(--color-bg-base) 80%, transparent);
    background-image: var(--acrylic-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating pill state on scroll */
.site-header.scrolled-pill {
    top: 12px;
    left: var(--space-md);
    right: var(--space-md);
    width: calc(100% - var(--space-md) * 2);
    max-width: 1000px;
    margin: 0 auto;
    height: 60px; /* Slimmer header height */
    border: 1px solid var(--ws-indigo-soft);
    border-radius: 50px;
    box-shadow: 0 16px 32px -8px var(--color-shadow);
    background: color-mix(in srgb, var(--color-bg-base) 85%, transparent);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header.scrolled-pill .nav-container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ws-indigo-deep);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    align-items: center;
    position: relative;
}
.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    position: relative;
    z-index: 2;
    transition: var(--transition-interactive);
}
.nav-hover-pill {
    position: absolute;
    background: var(--ws-indigo-subtle);
    border-radius: var(--radius-md);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.2s ease;
}
.nav-link:hover {
    color: var(--ws-indigo-mid);
}

/* Controls */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    transition: var(--transition-interactive);
}
.theme-toggle-btn:hover {
    background-color: var(--ws-indigo-subtle);
    border-color: var(--ws-indigo-soft);
}
/* --- Hero Section & Orbit Diagram --- */
.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
    align-items: center;
    padding-top: calc(var(--site-header-height) + var(--space-lg));
    min-height: 85vh;
}
.hero-content h1 span {
    background: linear-gradient(135deg, var(--ws-indigo-deep), var(--ws-orchid-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-interactive);
    cursor: pointer;
}
.btn-primary {
    background-color: var(--ws-indigo-deep);
    color: #ffffff;
    border: 1px solid var(--ws-indigo-deep);
}
.btn-primary:hover {
    background-color: var(--ws-indigo-mid);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px var(--color-shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover {
    background-color: var(--ws-indigo-subtle);
    border-color: var(--ws-indigo-soft);
    transform: translateY(-2px);
}
/* Orbit Graphic Container */
.hero-visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, color-mix(in srgb, var(--ws-indigo-subtle) 45%, transparent) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}
.orbit-center {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-image: var(--acrylic-noise);
    background-color: var(--acrylic-bg-2);
    border: var(--acrylic-border-2);
    box-shadow: var(--acrylic-shadow-2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
}
.orbit-center-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.orbit-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border: 1px dashed var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
/* Satellites */
.satellite-node {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-image: var(--acrylic-noise);
    background-color: var(--color-bg-base);
    border: 1px solid var(--ws-indigo-soft);
    box-shadow: var(--acrylic-shadow-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--ws-indigo-deep);
    pointer-events: auto;
    cursor: pointer;
    transition: var(--transition-interactive);
    animation: float-drift var(--float-duration, 4.5s) ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.45s);
}

.satellite-node:hover {
    scale: 1.15;
    background-color: var(--ws-indigo-subtle);
    border-color: var(--ws-indigo-deep);
    box-shadow: 0 8px 16px -4px var(--color-shadow);
}
/* Trigonometric floating keyframes */
@keyframes float-drift {
    0%, 100% {
        translate: 0 0;
    }
    25% {
        translate: var(--float-x) calc(var(--float-y) * -1);
    }
    50% {
        translate: calc(var(--float-x) * -0.65) var(--float-y);
    }
    75% {
        translate: calc(var(--float-y) * 0.5) calc(var(--float-x) * -0.4);
    }
}
/* --- About Section --- */
.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.section-title span {
    background: linear-gradient(135deg, var(--ws-indigo-deep), var(--ws-orchid-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}
.about-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.tag {
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    background-color: var(--ws-indigo-subtle);
    color: var(--ws-indigo-deep);
    border: 1px solid color-mix(in srgb, var(--ws-indigo-soft) 30%, transparent);
}

.tag-secondary {
    background-color: var(--ws-orchid-subtle);
    color: var(--ws-orchid-deep);
    border-color: color-mix(in srgb, var(--ws-orchid-soft) 30%, transparent);
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.project-meta {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.project-link {
    font-weight: 700;
    color: var(--ws-indigo-deep);
    text-decoration: none;
    font-size: 0.95rem;
}

.project-link:hover {
    text-decoration: underline;
}
/* --- Experience Timeline --- */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: var(--space-xl);
    border-left: 2px solid var(--color-border);
}
.timeline-container::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: var(--scroll-progress, 0%);
    background: linear-gradient(to bottom, var(--ws-indigo-deep), var(--ws-indigo-soft));
    transition: height 0.1s ease-out;
    z-index: 6;
}
.timeline-item {
    position: relative;
    margin-bottom: var(--space-xl);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--space-xl) * -1 - 9px);
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-bg-base);
    border: 3px solid var(--ws-indigo-soft);
    z-index: 5;
    transition: var(--transition-interactive);
}
.timeline-item:hover::before {
    background-color: var(--ws-indigo-deep);
    scale: 1.25;
}
.timeline-date {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ws-orchid-deep);
    margin-bottom: 0.25rem;
}

.timeline-card {
    background: var(--color-bg-base);
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: var(--transition-interactive);
}
.timeline-item:nth-child(even) .timeline-card {
    background: color-mix(in srgb, var(--ws-indigo-deep) 4%, var(--color-bg-base));
}
.timeline-item:hover .timeline-card {
    border-color: var(--ws-indigo-soft);
    box-shadow: 0 4px 16px -4px var(--color-shadow);
}
/* --- Contact & Forms --- */
.contact-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-lg);
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}
.contact-info-panel, .contact-form-panel {
    display: flex;
    flex-direction: column;
}
/* Contact grid responsive handled in M3 breakpoints below */
.form-group {
    position: relative;
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
}
.form-label {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left top;
    z-index: 5;
}
.form-control {
    padding: 1.25rem 1rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: color-mix(in srgb, var(--color-bg-base) 90%, transparent);
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-interactive);
}
.form-control::placeholder {
    color: transparent;
    transition: color 0.2s ease;
}
.form-control:focus::placeholder {
    color: var(--color-text-muted);
}
.form-group:focus-within .form-label,
.form-group.has-value .form-label {
    transform: translateY(-0.4rem) scale(0.8);
    color: var(--ws-indigo-mid);
    font-weight: 700;
}
.form-control:focus {
    outline: none;
    border-color: var(--ws-indigo-soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ws-indigo-soft) 25%, transparent);
    background-color: var(--color-bg-base);
}
.form-status {
    margin-top: var(--space-md);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    display: none;
    animation: fadeIn 0.4s ease;
}
.form-status.success {
    display: block;
    background-color: var(--ws-indigo-subtle);
    color: var(--ws-indigo-deep);
    border: 1px solid var(--ws-indigo-soft);
}
.form-status.error {
    display: block;
    background-color: var(--ws-coral-subtle);
    color: var(--ws-coral-deep);
    border: 1px solid var(--ws-coral-mid);
}
/* --- Light Indigo CTA Banner (L1 Surface) --- */
.cta-section {
    background: linear-gradient(135deg, var(--ws-indigo-subtle) 0%, color-mix(in srgb, var(--ws-indigo-subtle) 40%, var(--color-bg-base)) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ws-indigo-soft);
    box-shadow: var(--acrylic-shadow-2);
}
.cta-section h2 {
    color: var(--ws-indigo-deep);
    font-weight: 800;
}
.cta-section p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 650px;
}
/* --- Footer --- */
.site-footer {
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
}
.footer-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-xl);
    text-align: left;
}
.footer-column {
    display: flex;
    flex-direction: column;
}
.brand-col p {
    margin-top: var(--space-sm);
}
/* Footer responsive handled in M3 breakpoints below */
/* --- Scroll reveal core utility --- */
.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* --- Accessibility Adjustments --- */
@media (prefers-contrast: more) {
    .acrylic-card {
        background: var(--color-bg-base) !important;
        background-image: none !important;
        backdrop-filter: none !important;
        border: 2px solid var(--color-text) !important;
        box-shadow: none !important;
        transform: none !important;
    }
    
    .site-header {
        background: var(--color-bg-base) !important;
        background-image: none !important;
        backdrop-filter: none !important;
        border-bottom: 2px solid var(--color-text) !important;
    }
    .satellite-node {
        background-color: var(--color-bg-base) !important;
        border: 2px solid var(--color-text) !important;
        box-shadow: none !important;
        animation: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
        scroll-behavior: auto !important;
    }
    .satellite-node {
        animation: none !important;
    }
}
/* =============================================
   M3 RESPONSIVE LAYOUT SYSTEM
   Compact:  0 – 599px
   Medium:   600 – 839px
   Expanded: 840px +  (default desktop styles)
   ============================================= */

/* --- M3 Expanded (840px+) → default desktop, no overrides needed --- */

/* --- M3 Medium (600–839px) --- */
@media (max-width: 839px) {
    :root {
        --space-xl: 2.5rem;
        --space-2xl: 3.5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
        min-height: auto;
        padding-bottom: var(--space-xl);
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        height: 320px;
    }

    .orbit-center {
        width: 140px;
        height: 140px;
    }

    .orbit-ring {
        width: 260px;
        height: 260px;
    }

    .satellite-node {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

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

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .timeline-container {
        padding-left: var(--space-lg);
    }

    .timeline-item::before {
        left: calc(var(--space-lg) * -1 - 9px);
    }

    .contact-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }

    .footer-columns .brand-col {
        grid-column: 1 / -1;
    }

    /* Side nav: hide on medium screens */
    .side-nav-pill {
        display: none;
    }

    /* Floating header pill: full-width on medium */
    .site-header.scrolled-pill {
        left: var(--space-sm);
        right: var(--space-sm);
        width: calc(100% - var(--space-sm) * 2);
    }

    .modal-card {
        width: 94%;
        max-height: 90vh;
        padding: var(--space-lg);
    }

    .cta-section {
        padding: var(--space-lg);
    }

    section {
        padding: var(--space-lg) 0;
    }
}

/* --- M3 Compact (0–599px) --- */
@media (max-width: 599px) {
    :root {
        --site-header-height: 64px;
        --space-xl: 2rem;
        --space-2xl: 2.5rem;
    }

    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    /* Header: full-width strip on compact */
    .site-header {
        height: var(--site-header-height);
    }

    .site-header.scrolled-pill {
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        box-shadow: 0 4px 16px -4px var(--color-shadow);
    }

    .nav-container {
        padding-left: var(--space-sm) !important;
        padding-right: var(--space-sm) !important;
    }

    .nav-logo {
        font-size: 1.15rem;
    }

    /* Hero: single column, full width */
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-md);
        min-height: auto;
        padding-top: calc(var(--site-header-height) + var(--space-md));
        padding-bottom: var(--space-lg);
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
        font-size: 0.95rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .professional-identity {
        justify-content: center;
        font-size: 1rem;
    }

    .contact-info-bar {
        justify-content: center;
        font-size: 0.85rem;
        gap: var(--space-sm) var(--space-md);
    }

    /* Hero visual: smaller orbit */
    .hero-visual {
        height: 260px;
    }

    .orbit-center {
        width: 110px;
        height: 110px;
    }

    .orbit-ring {
        width: 210px;
        height: 210px;
    }

    .satellite-node {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .satellite-node svg {
        width: 22px;
        height: 22px;
    }

    /* Section titles */
    .section-title {
        margin-bottom: var(--space-lg);
    }

    /* About / Competencies grid: single column */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* Project grids: single column, fill width */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }

    /* Skills grid: single column */
    .skills-grid-container {
        grid-template-columns: 1fr !important;
    }

    /* Education grid: single column */
    .education-grid {
        grid-template-columns: 1fr !important;
    }

    /* Acrylic cards: reduce padding on compact */
    .acrylic-card {
        padding: var(--space-md);
    }

    /* Acrylic card hover: no lift on mobile (prevents tap jank) */
    .acrylic-card:hover {
        transform: none;
    }

    /* Timeline: remove line and dots on compact */
    .timeline-container {
        padding-left: 0;
        border-left: none;
    }

    .timeline-container::after {
        display: none;
    }

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

    .timeline-card {
        padding: var(--space-md);
    }

    /* Contact grid: single column */
    .contact-grid-wrapper {
        grid-template-columns: 1fr;
    }

    /* Footer: single column */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-bottom-row {
        flex-direction: column;
        text-align: center;
    }

    /* CTA banner: less padding */
    .cta-section {
        padding: var(--space-lg) var(--space-md);
        border-radius: var(--radius-md);
    }

    /* Side nav: completely hidden on compact */
    .side-nav-pill {
        display: none;
    }

    /* Modal: edge-to-edge on compact */
    .modal-card {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: var(--space-lg) var(--space-md) var(--space-md);
    }

    .modal-overlay {
        align-items: flex-end;
    }

    .modal-actions-row {
        flex-direction: column;
    }

    .modal-actions-row .btn {
        width: 100%;
        justify-content: center;
    }

    /* Scroll-to-top FAB: adjust position */
    .scroll-top-fab {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 3rem;
        height: 3rem;
    }

    /* Section padding: tighter */
    section {
        padding: var(--space-lg) 0;
    }

    /* Competency pillar card: no horizontal slide on tap */
    .competency-pillar-card:hover {
        transform: none !important;
    }

    /* Status badge: wrap if needed */
    .status-badge {
        font-size: 0.8rem !important;
    }

    /* Buttons on compact */
    .btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.25rem;
    }

    /* Form submit full width */
    #form-submit-btn {
        padding: 0.85rem !important;
    }
}
.professional-identity {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ws-indigo-mid);
    margin: 0.5rem 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.professional-identity .divider {
    color: var(--color-border);
    font-weight: 400;
    margin: 0 0.25rem;
}
/* Contact Info Bar under Hero tagline */
.contact-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    margin: 1rem 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}
.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.contact-item svg {
    color: var(--ws-indigo-mid);
}

/* Unelaborated Timeline Card Styling */
.timeline-item.timeline-unelaborated {
    margin-bottom: var(--space-lg);
}
.timeline-item.timeline-unelaborated::before {
    border-color: var(--color-border);
    background-color: var(--color-bg-base);
}
.timeline-item.timeline-unelaborated:hover::before {
    background-color: var(--ws-indigo-soft);
}
.timeline-card-unelaborated {
    background: color-mix(in srgb, var(--color-border) 10%, var(--color-bg-base));
    border: 1px dashed var(--color-border);
    padding: 0.75rem var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition-interactive);
    font-size: 0.95rem;
    color: var(--color-text-muted);
}
.timeline-card-unelaborated strong {
    color: var(--color-text);
}
.timeline-muted-type {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
}
.timeline-item.timeline-unelaborated:hover .timeline-card-unelaborated {
    border-color: var(--ws-indigo-soft);
    background-color: var(--color-bg-base);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Accessibility Skip Navigation --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--ws-indigo-deep);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    z-index: 100000;
    border-bottom-right-radius: var(--radius-md);
    transition: top 0.2s ease;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* --- Page Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--color-bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-content {
    text-align: center;
    width: 80%;
    max-width: 300px;
}
.preloader-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--ws-indigo-deep);
    margin-bottom: var(--space-md);
}
.preloader-bar {
    width: 100%;
    height: 3px;
    background: var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}
.preloader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--ws-indigo-deep), var(--ws-indigo-soft));
    transition: width 0.1s ease-out;
}
.preloader-percent {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

/* --- Inertia Custom Cursor --- */
.cursor-dot, .cursor-circle {
    display: none;
}
@media (pointer: fine) {
    .cursor-dot {
        display: block;
        position: fixed;
        width: 8px;
        height: 8px;
        background-color: var(--ws-indigo-deep);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        transform: translate(-50%, -50%);
        transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
    }
    .cursor-circle {
        display: block;
        position: fixed;
        width: 32px;
        height: 32px;
        border: 1px solid var(--ws-indigo-soft);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999998;
        transform: translate(-50%, -50%);
        transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    }
    /* Magnify hover state */
    body.cursor-magnify .cursor-dot {
        width: 4px;
        height: 4px;
        background-color: var(--ws-orchid-deep);
    }
    body.cursor-magnify .cursor-circle {
        width: 48px;
        height: 48px;
        border-color: var(--ws-orchid-soft);
        background-color: color-mix(in srgb, var(--ws-indigo-subtle) 40%, transparent);
    }
}

/* --- Scroll-to-Top Button (FAB) --- */
.scroll-top-fab {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--color-bg-base);
    background-image: var(--acrylic-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--acrylic-border-2);
    box-shadow: var(--acrylic-shadow-2);
    color: var(--ws-indigo-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, color 0.3s ease;
}
.scroll-top-fab.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-fab:hover {
    border-color: var(--ws-indigo-soft);
    color: var(--ws-indigo-mid);
    transform: scale(1.05);
}

/* --- Project Case Study Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--color-bg-base) 60%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--color-bg-base);
    border: var(--acrylic-border-2);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px -12px var(--color-shadow);
    position: relative;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    transform: translateY(40px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-card {
    transform: translateY(0);
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
    line-height: 1;
    z-index: 10;
}
.modal-close-btn:hover {
    color: var(--ws-indigo-deep);
}
.modal-meta-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 600;
}
.modal-content-section {
    margin-bottom: var(--space-lg);
}
.modal-content-section h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ws-indigo-deep);
    margin-bottom: 0.5rem;
}
.modal-content-section p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}
.modal-actions-row {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}
.modal-actions-row .btn {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
}

/* --- Side Navigation Pill Dock --- */
.side-nav-pill {
    position: fixed;
    left: 24px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    padding: var(--space-md) var(--space-xs);
    background: var(--acrylic-bg-2);
    background-image: var(--acrylic-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--acrylic-border-2);
    border-radius: 50px;
    box-shadow: var(--acrylic-shadow-2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.side-nav-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: var(--transition-interactive);
    position: relative;
    text-decoration: none;
    border: 1px solid transparent;
}
.side-nav-link:hover {
    color: var(--ws-indigo-deep);
    background: var(--ws-indigo-subtle);
    border-color: var(--ws-indigo-soft);
    scale: 1.05;
}
.side-nav-link.active {
    color: var(--ws-indigo-deep);
    background: var(--ws-indigo-subtle);
    border-color: var(--ws-indigo-mid);
    box-shadow: 0 0 16px 2px color-mix(in srgb, var(--ws-indigo-mid) 45%, transparent);
    scale: 1.15;
}
/* Tooltip that slides out on hover */
.side-nav-tooltip {
    position: absolute;
    left: 52px;
    right: auto;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: var(--color-bg-base);
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    box-shadow: 0 4px 12px -2px var(--color-shadow);
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-nav-link:hover .side-nav-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Side nav responsive handled in M3 breakpoints above */
