/* ═══════════════════════════════════════════════════════
   PREMIUM LIGHT THEME — DESIGN TOKENS
   Warm ivory backgrounds, deep emerald accent, burnished gold highlights.
   Instrument Serif + Inter font pairing.
   ═══════════════════════════════════════════════════════ */

:root {
    /* ── Color Palette ────────────────────────────────────── */
    --bg-base: #FAFAF8;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #F5F5F3;
    --bg-muted: #F0EFEB;

    --text-primary: #1A1A2E;
    --text-secondary: #64648C;

    --accent: #1B4D3E;
    --accent-hover: #2A7A5F;
    --accent-glow: rgba(27, 77, 62, 0.12);

    --highlight: #C8963E;
    --highlight-glow: rgba(200, 150, 62, 0.15);
    --positive: #1B4D3E;
    --positive-glow: rgba(27, 77, 62, 0.10);

    --border-subtle: #E8E7E3;
    --border-hover: rgba(27, 77, 62, 0.35);

    /* Legacy mapping */
    --bg: var(--bg-base);
    --bg-card: var(--bg-surface);
    --bg-card-hover: var(--bg-surface-hover);
    --glass-border: var(--border-subtle);
    --glass-border-hover: var(--border-hover);
    --text: var(--text-primary);
    --text-dim: var(--text-secondary);
    --text-muted: var(--text-secondary);
    --accent-cyan: var(--accent);
    --accent-cyan-glow: var(--accent-glow);

    /* ── Typography & Easing ───────────────────────────────── */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Shadows ───────────────────────────────────────────── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 8px 20px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.10);
}

/* ── 1. Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
li {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* ── 2. Background Elements ───────────────────────────── */
#particles-canvas {
    display: none !important;
}

.grid-overlay {
    display: none !important;
}

/* ── 3. Custom Cursor ─────────────────────────────────── */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), background 0.3s;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), border-color 0.3s, background 0.3s;
    opacity: 0.35;
}

.cursor-dot.hovering {
    width: 48px;
    height: 48px;
    background: rgba(27, 77, 62, 0.10);
    mix-blend-mode: normal;
}

.cursor-outline.hovering {
    width: 48px;
    height: 48px;
    border-color: var(--accent);
    opacity: 0.6;
}

.cursor-dot,
.cursor-outline {
    display: none !important;
}

body {
    cursor: default;
}

a, button, .btn, .project-card, .social-icon, .cn-node-btn {
    cursor: pointer;
}

/* ── 4. Navigation ────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s, box-shadow 0.4s;
    border-bottom: 1px solid transparent;
    background: rgba(250, 250, 248, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

nav.scrolled {
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border-subtle);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 72px;
}

.nav-logo {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: color 0.3s;
    flex-shrink: 0;
    z-index: 2;
}

.nav-logo:hover { color: var(--accent); }
.nav-logo:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-logo .accent {
    color: var(--accent);
}

.nav-links,
.mobile-menu-btn,
.mobile-menu {
    display: none !important;
}

#chart-nav {
    position: relative;
    flex: 1;
    height: 62px;
    min-width: 0;
    overflow: visible;
}

#chart-nav svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.cn-node-btn {
    position: absolute;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
}

.cn-node-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent);
}

/* ── Tooltip ──────────────────────────────────────────────── */
#cn-tooltip {
    position: fixed;
    z-index: 2000;
    transform: translate(-50%, -100%);
    margin-top: -8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.4;
}

#cn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border-subtle);
}

#cn-tooltip strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

#cn-tooltip.cn-tooltip--visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #cn-tooltip { transition: none; }
}

/* ── 5. Hero Section ──────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    background: var(--bg-base);
}

.hero-content {
    max-width: 900px;
    padding-top: 80px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
}

.title-line .accent {
    color: var(--accent);
}

.hero-typewriter {
    font-family: var(--font-mono);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 2em;
}

.typewriter-prefix {
    color: var(--text-secondary);
    user-select: none;
}

.typewriter-text {
    position: relative;
}

.typewriter-cursor {
    animation: blink 1s steps(1) infinite;
    color: var(--accent);
    margin-left: 2px;
}

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

.hero-tagline {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── Stat Counter Strip ──────────────────────────────── */
.stat-strip {
    position: relative;
    z-index: 1;
    padding: clamp(3rem, 6vh, 5rem) clamp(1.5rem, 5vw, 4rem);
    max-width: 1300px;
    margin: 0 auto;
}

.stat-strip-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-family: var(--font-head);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 400;
    color: var(--accent);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-number .stat-suffix {
    font-size: 0.7em;
    color: var(--accent);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ── 6. Buttons ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 100px;
    border: none;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.btn-primary:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(27, 77, 62, 0.04);
    color: var(--accent);
    transform: translateY(-2px);
}
.btn-outline:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-color: var(--accent);
}

.btn-sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.82rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(27, 77, 62, 0.2);
    border-radius: 100px;
}

.btn-sm:hover {
    background: rgba(27, 77, 62, 0.05);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.btn-sm:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ── 7. Sections Global ───────────────────────────────── */
.section,
#skills {
    position: relative;
    z-index: 1;
    padding: clamp(6rem, 15vh, 12rem) clamp(1.5rem, 5vw, 4rem);
    max-width: 1300px;
    margin: 0 auto;
    scroll-margin-top: 90px;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.label-number {
    color: var(--highlight);
    font-weight: 600;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
    max-width: 300px;
}

/* ── 8. About Section ─────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.about-heading {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-heading em {
    font-style: italic;
    color: var(--accent);
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ── Focus Areas Panel ───────────────────────────────── */
.focus-areas {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.focus-area-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-left: 1px solid var(--border-subtle);
    padding-left: 1.5rem;
    position: relative;
}

.focus-area-row + .focus-area-row {
    border-top: none;
}

.focus-area-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--highlight);
    letter-spacing: 0.05em;
    line-height: 1.6;
    flex-shrink: 0;
    min-width: 1.5rem;
}

.focus-area-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.focus-area-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.4;
}

.focus-area-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.skills-heading {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skills-tag-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.skills-tag-group:last-of-type {
    margin-bottom: 0;
}

.skills-tag-group-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.skill-tag {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    transition: all 0.3s var(--ease-out);
}

.skill-tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(27, 77, 62, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ── Skill Rings ─────────────────────────────────────── */
.skill-rings-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.skill-ring-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-ring-group-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.skill-ring-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.skill-ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 80px;
    transition: transform 0.3s var(--ease-out);
}

.skill-ring-item:hover {
    transform: translateY(-4px);
}

.skill-ring-svg-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.skill-ring-svg {
    width: 64px;
    height: 64px;
    transform: rotate(-90deg);
}

.skill-ring-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 3.5;
}

.skill-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 1.2s var(--ease-out);
}

.skill-ring-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 1;
    pointer-events: none;
    line-height: 1;
    transition: transform 0.3s var(--ease-out), color 0.3s;
}

.skill-ring-item:hover .skill-ring-fill {
    stroke: var(--accent-hover);
}

.skill-ring-item:hover .skill-ring-percent {
    color: var(--accent-hover);
    transform: translate(-50%, -50%) scale(1.08);
}

.skill-ring-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

.skill-badge-cert {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(200, 150, 62, 0.4);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--highlight);
    background: rgba(200, 150, 62, 0.06);
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
}

.skill-badge-cert:hover,
.skill-badge-cert:focus-visible {
    background: rgba(200, 150, 62, 0.12);
    border-color: var(--highlight);
    box-shadow: 0 2px 8px rgba(200, 150, 62, 0.15);
    transform: translateY(-2px);
    outline: none;
}

/* ── 9. Project Cards ─────────────────────────────────── */
.project-card {
    position: relative;
    margin-bottom: 2.5rem;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.project-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
    border-radius: 20px;
}

.project-card-inner {
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: clamp(2rem, 4vw, 3rem);
    transition: all 0.5s var(--ease-out);
}

.project-card:hover .project-card-inner {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    opacity: 0;
    z-index: 0;
    transition: opacity 0.5s;
    filter: blur(2px);
}

.project-card:hover .project-glow {
    opacity: 0.08;
}

.project-card[data-featured="true"]:hover .project-glow {
    opacity: 0.15;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: var(--bg-muted);
}

.tag-featured {
    color: var(--highlight);
    border-color: rgba(200, 150, 62, 0.35);
    background: rgba(200, 150, 62, 0.08);
}

.project-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.project-link:hover,
.project-link:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(27, 77, 62, 0.06);
    transform: rotate(-45deg) scale(1.1);
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent);
}

.project-title {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 750px;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stack-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    color: var(--accent);
    background: rgba(27, 77, 62, 0.04);
    border: 1px solid rgba(27, 77, 62, 0.12);
    transition: all 0.3s var(--ease-out);
}

.project-card:hover .stack-badge {
    border-color: rgba(27, 77, 62, 0.25);
    background: rgba(27, 77, 62, 0.06);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.card-detail-btn {
    color: var(--accent);
    border-color: rgba(27, 77, 62, 0.2);
    background: rgba(27, 77, 62, 0.03);
    cursor: pointer;
    pointer-events: auto;
}

.project-card:hover .card-detail-btn {
    color: var(--accent-hover);
    border-color: var(--accent);
    background: rgba(27, 77, 62, 0.08);
    transform: translateX(4px);
}

/* ── 10. Timeline (Experience) ────────────────────────── */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), var(--border-subtle), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -3rem;
    top: 6px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg-base);
    z-index: 1;
    transition: background 0.3s, box-shadow 0.3s;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg-base), 0 0 12px var(--accent-glow);
}

.timeline-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    transition: all 0.4s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.timeline-content:hover {
    border-color: var(--border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.timeline-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.timeline-org {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

/* ── 11. Achievement Cards ────────────────────────────── */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--highlight), var(--accent));
    opacity: 0;
    transition: opacity 0.4s;
}

.achievement-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--accent-glow);
    margin: 0 auto 1.25rem;
    transition: background 0.3s, transform 0.4s var(--ease-out);
    animation: subtlePulse 3s ease-in-out infinite;
}

.achievement-card:hover .achievement-icon {
    background: rgba(27, 77, 62, 0.18);
    transform: scale(1.05);
}

@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.achievement-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.achievement-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── 12. Education ────────────────────────────────────── */
.education-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    max-width: 700px;
    transition: all 0.4s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.education-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.edu-icon { color: var(--accent); flex-shrink: 0; }

.edu-degree {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.edu-school {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.edu-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.edu-divider { color: var(--border-subtle); }

/* ── 13. Contact / Footer ─────────────────────────────── */
.contact { text-align: center; padding-bottom: 3rem; }

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-heading {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-heading .accent { color: var(--accent); }

.contact-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s, background 0.3s;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    margin: 0 -0.75rem;
}

.contact-item svg { color: var(--accent); flex-shrink: 0; }

.contact-item:hover,
.contact-item:focus-visible {
    color: var(--text-primary);
    outline: none;
    background: rgba(27, 77, 62, 0.04);
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: var(--bg-surface);
    transition: all 0.4s var(--ease-out);
}

.social-icon:hover,
.social-icon:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(27, 77, 62, 0.06);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    outline: none;
}

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    padding: 2rem clamp(1.5rem, 5vw, 4rem);
    background: var(--bg-base);
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.footer-dot { color: var(--border-subtle); }
.footer-accent { color: var(--accent); }

.metric-num {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
}

/* ── 14. Reveal Animation ─────────────────────────────── */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.js-loaded .reveal-up:not(.revealed) {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }

/* ── 15. Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .achievements-grid { grid-template-columns: repeat(2, 1fr); }
    .education-card { flex-direction: column; text-align: center; gap: 1rem; }
    .stat-strip-inner { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .focus-areas { margin-top: 2rem; }
    .focus-area-row { padding: 1rem 0; padding-left: 1.25rem; }
}

@media (max-width: 768px) {
    #chart-nav { height: 52px; }
    .title-line { font-size: clamp(2.5rem, 12vw, 4.5rem); }
    .hero-tagline br { display: none; }
    .scroll-indicator { display: none; }
    .achievements-grid { grid-template-columns: 1fr; }
    .timeline { padding-left: 2rem; }
    .timeline::before { left: 4px; }
    .timeline-dot { left: -2rem; }
    .timeline-content { padding: 1.5rem; }
    .contact-heading { font-size: clamp(2rem, 8vw, 3rem); }
    .footer-inner { flex-direction: column; gap: 0.25rem; }
    .stat-strip-inner { grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 2rem 0; }
    .stat-number { font-size: clamp(1.8rem, 5vw, 2.5rem); }
}

@media (max-width: 480px) {
    nav { padding: 0 1rem; }
    .nav-logo { font-size: 1.3rem; }
    #chart-nav { height: 46px; }
    .hero-content { padding-top: 88px; }
    .social-row { gap: 1rem; }
    .social-icon { width: 42px; height: 42px; }
    .stat-strip-inner { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .skill-ring-row { gap: 1rem; justify-content: center; }
    .skill-ring-item { width: 70px; }
    .skill-ring-svg { width: 56px; height: 56px; }
}

#chart-nav path { will-change: stroke-dashoffset; }

/* ── 16. Resume Preview Modal ────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(26, 26, 46, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay:not([hidden]) { display: flex; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    width: 100%;
    max-width: 960px;
    height: 85vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.96) translateY(10px);
    transition: transform 0.3s var(--ease-out);
}

.modal-overlay.active .modal-container { transform: scale(1) translateY(0); }

.modal-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    flex-shrink: 0;
    gap: 1rem;
}

.modal-title-wrap { display: flex; flex-direction: column; gap: 2px; }

.modal-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.2;
}

.modal-subtitle {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.modal-actions { display: flex; align-items: center; gap: 0.6rem; }

.modal-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    text-decoration: none;
}

.modal-icon-btn:hover,
.modal-icon-btn:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent);
    background: rgba(27, 77, 62, 0.06);
    outline: none;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
    color: #C0392B;
    border-color: rgba(192, 57, 43, 0.3);
    background: rgba(192, 57, 43, 0.06);
}

.modal-body {
    flex: 1;
    position: relative;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.resume-iframe { width: 100%; height: 100%; border: none; background: var(--bg-muted); }

.resume-fallback[hidden] { display: none !important; }

.resume-fallback:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.fallback-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    text-align: center;
    max-width: 460px;
    box-shadow: var(--shadow-md);
}

.fallback-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.fallback-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.fallback-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.fallback-text code {
    background: var(--bg-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.fallback-instruction { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.fallback-actions { margin-top: 0.5rem; }

@media (max-width: 768px) {
    .modal-overlay { padding: 0; }
    .modal-container { width: 100vw; height: 100vh; max-width: 100%; max-height: 100%; border-radius: 0; border: none; }
    .modal-header { padding: 0.85rem 1rem; }
    .modal-title { font-size: 1rem; }
    .modal-download-btn span { display: none; }
    .modal-download-btn { padding: 0.55rem; border-radius: 50%; }
}

/* ── 17. Project Detail Modal ───────────────────── */
.pdm-container { max-width: 920px; height: 88vh; max-height: 920px; }

.pdm-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.pdm-header-left { display: flex; flex-direction: column; gap: 0.35rem; }

.pdm-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.2rem; }

.pdm-title {
    font-family: var(--font-head);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.pdm-tagline { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 0.03em; }
.pdm-header-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.pdm-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background: var(--bg-base);
    scroll-behavior: smooth;
}

.pdm-section { display: flex; flex-direction: column; gap: 1rem; }

.pdm-section-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pdm-num { color: var(--highlight); font-weight: 600; }

.pdm-overview-text { font-size: 1.02rem; color: var(--text-primary); line-height: 1.8; }

.pdm-problem-list { display: flex; flex-direction: column; gap: 0.85rem; }

.pdm-problem-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--highlight);
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--shadow-sm);
}

.pdm-problem-title { font-family: var(--font-head); font-size: 1rem; font-weight: 400; color: var(--text-primary); }
.pdm-problem-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.pdm-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1rem; }

.pdm-feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-sm);
}

.pdm-feature-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.pdm-feature-header { display: flex; align-items: center; gap: 0.6rem; }
.pdm-feature-icon { font-size: 1.2rem; line-height: 1; }
.pdm-feature-title { font-family: var(--font-head); font-size: 1rem; font-weight: 400; color: var(--text-primary); }
.pdm-feature-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; }

.pdm-stack-groups { display: flex; flex-direction: column; gap: 1rem; }

.pdm-stack-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pdm-stack-cat { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.pdm-stack-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.pdm-footer-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .pdm-container { width: 100vw; height: 100vh; max-width: 100%; max-height: 100%; border-radius: 0; }
    .pdm-header { padding: 1rem; flex-direction: column; align-items: flex-start; }
    .pdm-header-actions { width: 100%; justify-content: flex-end; }
    .pdm-body { padding: 1.25rem 1rem; gap: 1.75rem; }
    .pdm-features-grid { grid-template-columns: 1fr; }
    .pdm-footer-cta { flex-direction: column; width: 100%; }
    .pdm-footer-cta .btn { width: 100%; justify-content: center; }
}

/* ═══════════════════ CERTIFICATIONS SECTION ═══════════════════ */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.cert-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

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

.cert-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.deloitte-badge {
    background: rgba(134, 188, 37, 0.15);
    color: #86BC25;
    border: 1px solid rgba(134, 188, 37, 0.3);
}

.aws-badge {
    background: rgba(255, 153, 0, 0.15);
    color: #FF9900;
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.hackerrank-badge {
    background: rgba(46, 204, 113, 0.15);
    color: #2ECC71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.neo-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cert-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cert-title {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}

.cert-issuer {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: -0.5rem;
}

.cert-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.cert-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.cert-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 900px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}