/* ===== CSS Reset & Variables ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0b;
    --bg-alt: #111114;
    --surface: #18181b;
    --surface-hover: #1f1f23;
    --border: #27272a;
    --border-light: #3f3f46;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-glow-strong: rgba(99, 102, 241, 0.3);
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
    --gradient-3: #a78bfa;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 1rem;
    z-index: 200;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
}

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

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

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

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

/* ===== Cursor Glow ===== */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
    body:hover .cursor-glow {
        opacity: 1;
    }
}

@media (hover: none), (pointer: coarse) {
    .cursor-glow {
        display: none;
    }
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition);
    background: linear-gradient(to bottom, rgba(10, 10, 11, 0.7), rgba(10, 10, 11, 0));
    backdrop-filter: blur(6px);
}

.nav.scrolled {
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #c2c2cd;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--accent);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.btn:focus-visible,
.social-link:focus-visible,
.nav-link:focus-visible,
.mobile-link:focus-visible,
.nav-toggle:focus-visible {
    box-shadow: 0 0 0 4px var(--accent-glow-strong);
    border-radius: 8px;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 0 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse at center, black 42%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 42%, transparent 78%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
    will-change: transform, opacity;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -10%;
    left: -5%;
    animation-delay: -3s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--gradient-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.42);
}

.hero-title .line {
    display: block;
}

.hero-title .line:first-child {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.25em;
}

.name-line {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.hero-subtitle strong {
    color: var(--text);
    font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 0 var(--accent-glow-strong);
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 40px 0 var(--accent-glow-strong);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-light);
    background: var(--surface);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* ===== Hero Highlights ===== */
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    max-width: 960px;
    margin: 0 auto;
}

.highlight-card {
    text-align: left;
    padding: 1rem 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(24, 24, 27, 0.9), rgba(17, 17, 20, 0.7));
    backdrop-filter: blur(6px);
}

.highlight-card h3 {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
}

.highlight-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

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

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    50.01% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* ===== Sections ===== */
.section {
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.about-details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 100px;
    font-weight: 500;
}

.detail-value {
    color: var(--text);
    font-weight: 500;
}

.about-visual {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.about-flip-card {
    perspective: 1200px;
    outline: none;
    cursor: pointer;
}

.about-flip-inner {
    position: relative;
    min-height: clamp(390px, 42vw, 460px);
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
}

.about-flip-card:hover .about-flip-inner,
.about-flip-card:focus-visible .about-flip-inner,
.about-flip-card:focus-within .about-flip-inner {
    transform: rotateY(180deg);
}

.about-flip-card.is-flipped .about-flip-inner {
    transform: rotateY(180deg);
}

.about-flip-card:focus-visible {
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 4px var(--accent-glow-strong);
}

.about-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.about-face-front .code-window,
.about-face-back .profile-card {
    height: 100%;
}

.about-face-front .code-window {
    display: flex;
    flex-direction: column;
}

.about-face-front .code-header {
    padding: 0.72rem 1rem;
}

.about-face-front .code-body {
    flex-grow: 1;
    overflow: hidden;
    padding: 0.95rem 1rem;
    font-size: 0.77rem;
    line-height: 1.58;
}

.about-face-back {
    transform: rotateY(180deg);
}

.profile-card {
    margin: 0;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 55px -35px rgba(99, 102, 241, 0.5);
    display: flex;
    flex-direction: column;
}

.profile-image {
    width: 100%;
    height: auto;
    flex: 1;
    min-height: 0;
    object-fit: cover;
    object-position: center 24%;
    display: block;
}

.profile-caption {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.875rem 1.1rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.7), rgba(17, 17, 20, 0.95));
}

/* ===== Code Window ===== */
.code-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) {
    background: #ff5f57;
}
.code-dots span:nth-child(2) {
    background: #febc2e;
}
.code-dots span:nth-child(3) {
    background: #28c840;
}

.code-filename {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.code-body {
    padding: 1.25rem;
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.8;
    overflow: hidden;
}

.code-keyword {
    color: #c084fc;
}
.code-var {
    color: #60a5fa;
}
.code-prop {
    color: #a78bfa;
}
.code-string {
    color: #34d399;
}

/* ===== Timeline ===== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    position: relative;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 2px solid var(--accent);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-item:first-child .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow-strong);
}

.timeline-line {
    width: 2px;
    flex-grow: 1;
    background: var(--border);
    margin: 0.5rem 0;
}

.timeline-item:last-child .timeline-line {
    background: linear-gradient(to bottom, var(--border), transparent);
}

.timeline-content {
    padding-bottom: 3rem;
    width: min(100%, 900px);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.timeline-header > div {
    flex: 1;
    min-width: 0;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-company {
    display: block;
    color: var(--accent-light);
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 0.125rem;
}

.timeline-date {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: auto;
    min-width: 160px;
    text-align: right;
}

.timeline-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.tag {
    background: var(--accent-glow);
    color: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skill-card-featured {
    grid-column: span 2;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

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

.skill-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    color: var(--accent-light);
}

.skill-icon svg {
    width: 24px;
    height: 24px;
}

.skill-title {
    position: relative;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.skill-desc {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.skill-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.skill-tags span {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* ===== Projects ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px var(--accent-glow);
}

.project-number {
    font-family: var(--mono);
    font-size: 3rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.project-card:hover .project-number {
    color: var(--accent-glow-strong);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

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

.project-tags span {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* ===== Education ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.edu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    text-align: center;
}

.edu-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.edu-year {
    font-family: var(--mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.edu-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.edu-school {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Contact ===== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-light);
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

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

.footer-copy,
.footer-made {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
    transition:
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-card-featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .gradient-orb {
        filter: blur(48px);
        opacity: 0.2;
        animation: none;
    }

    .orb-3 {
        display: none;
    }

    .hero-highlights {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

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

    .about-flip-inner {
        min-height: clamp(390px, 92vw, 460px);
    }

    .about-face-front .code-body {
        max-height: none;
    }

    .skills-grid,
    .projects-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        gap: 1.25rem;
    }

    .timeline-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .timeline-date {
        margin-left: 0;
        min-width: 0;
        text-align: left;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 3rem;
    }

    .section {
        padding: clamp(3rem, 8vw, 5rem) 0;
    }

    .project-card,
    .skill-card,
    .edu-card {
        padding: 1.5rem;
    }

    .code-body {
        font-size: 0.75rem;
    }
}

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

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

    .cursor-glow,
    .scroll-indicator,
    .gradient-orb {
        display: none;
    }

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