/* ============================================
   WALID BELBACH — PORTFOLIO
   Clean, Professional, Recruiter-Ready
   ============================================ */

:root {
    --white: #ffffff;
    --off-white: #fafafa;
    --cream: #f5f3f0;
    --light-gray: #e8e6e3;
    --mid-gray: #9a9a9a;
    --dark-gray: #4a4a4a;
    --charcoal: #2d2d2d;
    --black: #1a1a1a;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Skip Link - Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--black);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 4rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: all 0.3s var(--ease);
}

.nav.scrolled {
    padding: 1rem 4rem;
    box-shadow: 0 1px 0 var(--light-gray);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
}

.nav-logo span { color: var(--mid-gray); }

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--black); }

.nav-resume {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--black);
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-resume:hover {
    background: var(--black);
    color: var(--white);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 24px;
    height: 18px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--black);
    top: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--black);
    left: 0;
    transition: 0.3s;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { bottom: -7px; }

/* ============================================
   HERO — Full Width Split
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 4rem;
    position: relative;
}

.hero-left {
    padding: 8rem 0 4rem;
    max-width: 560px;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}

.label-line {
    width: 40px;
    height: 1px;
    background: var(--black);
}

.hero-label span:last-child {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dark-gray);
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--black);
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.2s forwards;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.25s forwards;
}

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

.hero-tagline {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--dark-gray);
    margin-bottom: 1.25rem;
    max-width: 520px;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.3s forwards;
}

.hero-tagline strong {
    color: var(--black);
    font-weight: 600;
}

.hero-education {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--dark-gray);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.35s forwards;
}

.hero-education svg {
    color: var(--mid-gray);
    flex-shrink: 0;
}

.hero-education strong {
    color: var(--black);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.4s forwards;
}

.btn-primary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
    background: var(--black);
    padding: 0.875rem 1.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--charcoal);
    transform: translateY(-1px);
}

.btn-secondary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--black);
    background: transparent;
    padding: 0.875rem 1.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--black);
}

.hero-socials-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.5s forwards;
}

.hero-socials-inline a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.hero-socials-inline a:hover { color: var(--black); }

.hero-socials-inline .divider {
    color: var(--light-gray);
    font-size: 0.75rem;
}

/* Hero Right - Image */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.8s var(--ease) 0.4s forwards;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%);
    transition: filter 0.4s, transform 0.4s;
}

.hero-image-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeIn 0.6s var(--ease) 0.8s forwards;
}

.hero-scroll-hint span {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-gray);
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--mid-gray);
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 8rem 4rem;
    border-top: 1px solid var(--light-gray);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 5rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.about-left {
    display: flex;
    flex-direction: column;
}

.about-header {
    margin-bottom: 2rem;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--mid-gray);
    display: block;
    margin-bottom: 0.5rem;
}

.about-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--black);
}

.about-content {
    max-width: 100%;
}

.about-lead {
    font-size: 1.375rem;
    line-height: 1.65;
    color: var(--charcoal);
    margin-bottom: 1.75rem;
    font-weight: 400;
}

.about-details p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--dark-gray);
    margin-bottom: 1.25rem;
}

/* Hobbies Text */
.about-hobbies-text {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

.hobbies-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 1rem;
}

.about-hobbies-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-gray);
    margin-bottom: 0.875rem;
}

/* Photo Gallery - Interactive Bento Grid */
.about-photos {
    position: relative;
    width: 100%;
    max-width: 540px;
}

.photo-gallery {
    width: 100%;
    position: relative;
}

.gallery-main {
    width: 100%;
    position: relative;
}

.gallery-image-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 85px;
    gap: 6px;
    width: 100%;
    position: relative;
}

/* All images base styles */
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: var(--charcoal);
    transition:
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease,
        filter 0.3s ease,
        box-shadow 0.45s ease,
        border-radius 0.3s ease;
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
}

/* When container is hovered, dim all images */
.gallery-image-container:hover .gallery-image {
    opacity: 0.4;
    filter: brightness(0.5) saturate(0.5);
    transform: scale(0.95);
}

/* The hovered image BREAKS OUT and covers others */
.gallery-image-container:hover .gallery-image:hover {
    opacity: 1;
    filter: brightness(1.05);
    transform: scale(3);
    z-index: 1000;
    box-shadow:
        0 0 0 4px var(--white),
        0 40px 100px rgba(0,0,0,0.5);
    border-radius: 12px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    background: var(--charcoal);
}

/* ========== BENTO GRID LAYOUT - 19 Images ========== */
/* Large images (2x2) - Images 1, 11 */
.gallery-image:nth-child(1),
.gallery-image:nth-child(11) {
    grid-column: span 2;
    grid-row: span 2;
    border-radius: 12px;
}

/* Tall images (1x2) - Images 3, 5, 9, 14 */
.gallery-image:nth-child(3),
.gallery-image:nth-child(5),
.gallery-image:nth-child(9),
.gallery-image:nth-child(14) {
    grid-row: span 2;
}

/* Wide images (2x1) - Images 6, 15, 18 */
.gallery-image:nth-child(6),
.gallery-image:nth-child(15),
.gallery-image:nth-child(18) {
    grid-column: span 2;
}

/* Image 19 (new one) - small square */
.gallery-image:nth-child(19) {
    grid-column: span 1;
    grid-row: span 1;
}

/* All other images stay 1x1 (default) */
/* Images 2, 4, 7, 8, 10, 12, 13, 16, 17, 19 are small squares */

/* Remove old stacking classes effect */
.gallery-image.active,
.gallery-image.stack-1,
.gallery-image.stack-2 {
    opacity: 1;
    transform: scale(1);
    z-index: auto;
    pointer-events: auto;
}

/* When hovering container, these also get the effect */
.gallery-image-container:hover .gallery-image.active,
.gallery-image-container:hover .gallery-image.stack-1,
.gallery-image-container:hover .gallery-image.stack-2 {
    opacity: 0.4;
    filter: brightness(0.5) saturate(0.5);
    transform: scale(0.95);
}

.gallery-image-container:hover .gallery-image.active:hover,
.gallery-image-container:hover .gallery-image.stack-1:hover,
.gallery-image-container:hover .gallery-image.stack-2:hover {
    opacity: 1;
    filter: brightness(1.05);
    transform: scale(3);
    z-index: 1000;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    background: var(--charcoal);
    box-shadow:
        0 0 0 4px var(--white),
        0 40px 100px rgba(0,0,0,0.5);
}

/* Controls - hidden for bento grid */
.gallery-controls {
    display: none;
}

.gallery-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.gallery-arrows {
    display: flex;
    gap: 0.5rem;
}

.gallery-arrow {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    color: var(--charcoal);
    font-size: 1.25rem;
    font-weight: 400;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-arrow:hover {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
    transform: scale(1.1);
}

.gallery-arrow:active {
    transform: scale(0.92);
    transition: transform 0.1s ease;
}

.gallery-counter {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--dark-gray);
    min-width: 55px;
    text-align: center;
    padding: 0.5rem 0.875rem;
    background: var(--off-white);
    border-radius: 100px;
}

.gallery-counter .current-index {
    font-weight: 600;
    color: var(--black);
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Progress bar */
.gallery-progress {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.gallery-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--charcoal), var(--black));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.gallery-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Keyboard hint */
.gallery-hint {
    font-size: 0.6875rem;
    color: var(--mid-gray);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    min-width: 20px;
}

/* Hide dots - using progress bar instead */
.gallery-dots {
    display: none;
}

/* ============================================
   SKILLS — Categorized Cards
   ============================================ */
.skills {
    padding: 6rem 4rem;
    background: var(--off-white);
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-header {
    margin-bottom: 3rem;
}

.skills-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s var(--ease);
}

.skill-card:hover {
    border-color: var(--charcoal);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.skill-card-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid-gray);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
}

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

.skill-tags span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--charcoal);
    padding: 0.375rem 0.75rem;
    background: var(--cream);
    border-radius: 100px;
    transition: all 0.2s var(--ease);
    cursor: default;
}

.skill-tags span:hover {
    background: var(--black);
    color: var(--white);
}

/* ============================================
   PUBLICATION
   ============================================ */
.publication {
    padding: 8rem 4rem;
    background: var(--white);
    border-top: 1px solid var(--light-gray);
}

.publication-header {
    margin-bottom: 4rem;
}

.publication-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.publication-content {
    max-width: 900px;
    margin: 0 auto;
}

.publication-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
    padding: 2.5rem;
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    border-radius: 16px;
    transition: all 0.3s var(--ease);
}

.publication-card:hover {
    border-color: var(--charcoal);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.publication-left {
    margin-bottom: 0;
}

.publication-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--mid-gray);
    margin-bottom: 1rem;
}

.publication-paper-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.publication-venue {
    font-size: 1.125rem;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.publication-location {
    font-size: 1rem;
    color: var(--mid-gray);
    margin-bottom: 1.25rem;
}

.publication-description {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.publication-link:hover {
    color: var(--black);
}

.publication-link svg {
    transition: transform 0.2s;
}

.publication-link:hover svg {
    transform: translate(2px, -2px);
}

.publication-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    min-width: 160px;
}

.publication-stat {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.publication-stat:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.publication-stat .stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1;
    margin-bottom: 0.375rem;
}

.publication-stat .stat-label {
    font-size: 0.8125rem;
    color: var(--mid-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   EXPERIENCE — Premium Timeline
   ============================================ */
.experience {
    padding: 8rem 0 6rem;
    background: var(--off-white);
    border-top: 1px solid var(--light-gray);
    position: relative;
    overflow: hidden;
}

.exp-header {
    padding: 0 4rem;
    margin-bottom: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.exp-header-content {
    display: flex;
    flex-direction: column;
}

.exp-header .section-num {
    color: var(--mid-gray);
}

.exp-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.exp-subtitle {
    font-size: 1rem;
    color: var(--dark-gray);
    font-weight: 400;
}

.exp-nav {
    display: flex;
    gap: 0.75rem;
}

.exp-nav-btn {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    color: var(--charcoal);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
}

.exp-nav-btn:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    transform: scale(1.05);
}

.exp-nav-btn:active {
    transform: scale(0.95);
}

.exp-scroll-container {
    overflow-x: auto;
    overflow-y: visible;
    padding: 1rem 4rem 2rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
}

.exp-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.exp-scroll-container::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.exp-scroll-container::-webkit-scrollbar-thumb {
    background: var(--mid-gray);
    border-radius: 3px;
}

.exp-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

.exp-track {
    display: flex;
    gap: 2rem;
    padding: 1rem 0 2rem;
}

.exp-card {
    flex: 0 0 420px;
    position: relative;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 16px;
    transition: all 0.4s var(--ease);
    overflow: hidden;
}

.exp-card:hover {
    border-color: var(--charcoal);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.15);
}

/* Featured card (first/main experience) */
.exp-featured {
    background: var(--white);
    border-color: var(--charcoal);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
}

.exp-featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--black), var(--charcoal));
}

/* Large experience number */
.card-number {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--light-gray);
    line-height: 1;
    pointer-events: none;
    transition: all 0.5s ease;
}

.exp-card:hover .card-number {
    color: var(--mid-gray);
    transform: scale(1.05);
}

.exp-featured .card-number {
    color: rgba(0,0,0,0.06);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
    padding: 0.375rem 0.75rem;
    background: #d1fae5;
    border-radius: 100px;
}

.card-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--mid-gray);
    letter-spacing: 0.02em;
}

.card-role {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.375rem;
    letter-spacing: -0.01em;
}

.card-company {
    font-size: 1rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.card-location {
    font-size: 0.8125rem;
    color: var(--mid-gray);
    margin-bottom: 1.25rem;
}

.card-desc {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 2px solid var(--light-gray);
}

.card-bullets {
    list-style: none;
    margin-bottom: 1.75rem;
}

.card-bullets li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
}

.card-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 5px;
    height: 5px;
    background: var(--black);
    border-radius: 50%;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-tech span {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--dark-gray);
    padding: 0.375rem 0.75rem;
    background: var(--cream);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.card-tech span:hover {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}


/* ============================================
   PROJECTS — Visual Grid Cards
   ============================================ */
.work {
    padding: 8rem 4rem;
    background: var(--off-white);
    border-top: 1px solid var(--light-gray);
}

.work-header {
    margin-bottom: 4rem;
}

.work-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 100%;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--light-gray);
    transition: all 0.3s var(--ease);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.1);
    border-color: var(--charcoal);
}

.project-image {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--black) 100%);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.9;
    transition: transform 0.4s var(--ease), opacity 0.3s;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    opacity: 1;
}

/* Specific image positioning for better framing */
.project-card:nth-child(1) .project-image img {
    /* Automating Requirements - show bottom part */
    object-position: center 100%;
}

.project-card:nth-child(2) .project-image img {
    /* Intalyzer */
    object-position: center 30%;
}

.project-card:nth-child(3) .project-image img {
    /* Feedback */
    object-position: center top;
}

.project-card:nth-child(4) .project-image img {
    /* MediChronicle */
    object-position: center top;
}

.project-card:nth-child(5) .project-image img {
    /* Finance */
    object-position: center top;
}

.project-card:nth-child(6) .project-image img {
    /* Sentiment */
    object-position: center top;
}

.project-card:nth-child(7) .project-image img {
    /* Flight */
    object-position: center 38%;
}

.project-card:nth-child(8) .project-image img {
    /* Network */
    object-position: center 60%;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--white);
    padding: 0.25rem 0.625rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 4px;
}

.project-private {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--white);
    padding: 0.25rem 0.5rem;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
}

.project-body {
    padding: 1.5rem;
}

.project-body h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-body p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.project-body p strong {
    color: var(--black);
    font-weight: 600;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--dark-gray);
    padding: 0.25rem 0.5rem;
    background: var(--cream);
    border-radius: 4px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    transition: all 0.2s;
}

.project-link:hover {
    color: var(--dark-gray);
}

.work-more {
    margin-top: 3rem;
    text-align: center;
}

.work-more a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    transition: all 0.2s;
}

.work-more a:hover {
    color: var(--black);
    border-color: var(--black);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 8rem 4rem;
    background: var(--black);
    color: var(--white);
}

.contact-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 5rem;
}

.contact-header .section-num {
    color: var(--mid-gray);
}

.contact-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--mid-gray);
    max-width: 500px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 5rem;
    align-items: start;
}

/* Contact Cards */
.contact-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateX(8px);
}

.contact-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--white);
    flex-shrink: 0;
}

.contact-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid-gray);
}

.contact-card-value {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s;
}

a.contact-card-value:hover {
    opacity: 0.7;
}

/* Social Links */
.contact-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-2px);
}

.social-link svg {
    flex-shrink: 0;
}

/* Contact Form */
.contact-right {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--white);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.35);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--black);
    background: var(--white);
    padding: 1.125rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.form-submit:hover {
    background: var(--off-white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit svg {
    transition: transform 0.3s ease;
}

.form-submit:hover svg {
    transform: translateX(4px) translateY(-4px);
}

.form-note {
    font-size: 0.8125rem;
    color: var(--mid-gray);
    margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 1.5rem 4rem;
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--mid-gray);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE — Tablet (1100px)
   ============================================ */
@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 4rem;
        min-height: auto;
    }

    .hero-left {
        padding: 2rem 0;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

    .hero-tagline {
        max-width: 600px;
    }

    .hero-right {
        display: none;
    }

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

    .about-photos {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .gallery-image-container {
        height: 450px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

/* ============================================
   RESPONSIVE — Mobile (768px)
   ============================================ */
@media (max-width: 768px) {

    /* ========== NAVIGATION — Top Shelf Dropdown ========== */
    .nav {
        padding: 1rem 1.5rem;
        background: var(--white);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 5rem 2rem 2rem;
        transform: translateY(-100%);
        transition: transform 0.35s var(--ease);
        z-index: 999;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.25rem;
        font-weight: 500;
        color: var(--black);
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-resume {
        display: block;
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        margin-left: auto;
        margin-right: 1rem;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
        position: relative;
    }

    .nav-toggle.active span { background: transparent; }
    .nav-toggle.active span::before { transform: rotate(45deg); top: 0; }
    .nav-toggle.active span::after { transform: rotate(-45deg); bottom: 0; }

    /* ========== HERO — Mobile with Profile Picture ========== */
    .hero {
        padding: 6rem 1.5rem 3rem;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 0;
    }

    .hero-right {
        display: block !important;
        order: -1;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .hero-image-wrapper {
        width: 140px !important;
        height: 140px !important;
        max-width: 140px !important;
        border-radius: 50% !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.12);
        border: 4px solid var(--white);
        overflow: hidden;
    }

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

    .hero-left {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-label {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .hero-name {
        font-size: 2.5rem;
        line-height: 1.15;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        margin-bottom: 1rem;
    }

    .hero-tagline {
        font-size: 0.9375rem;
        line-height: 1.7;
        max-width: 340px;
        margin-bottom: 1rem;
    }

    .hero-education {
        justify-content: center;
        flex-wrap: wrap;
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .hero-socials-inline {
        justify-content: center;
    }

    .hero-scroll-hint { display: none; }

    /* ========== ABOUT — Clean Mobile Layout ========== */
    .about {
        padding: 4rem 1.5rem;
    }

    .about-container {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
    }

    /* Use display:contents to flatten structure so children can be reordered */
    .about-left {
        display: contents;
    }

    .about-content {
        display: contents;
    }

    /* Mobile order: Header → Lead → Details → Beyond Code → Gallery */
    .about-header {
        order: 1;
    }

    .about-lead {
        order: 2;
        font-size: 1.125rem;
    }

    .about-details {
        order: 3;
    }

    .about-details p {
        font-size: 1rem;
    }

    .about-hobbies-text {
        order: 4;
        margin-top: 0 !important;
        padding-top: 1.5rem;
        border-top: 1px solid var(--light-gray);
    }

    .about-hobbies-text p {
        font-size: 0.9375rem;
    }

    /* ========== GALLERY — Horizontal Scroll Strip ========== */
    .about-photos {
        order: 5;
        max-width: 100vw;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding: 0 1.5rem;
    }

    .photo-gallery {
        width: 100%;
    }

    .gallery-main {
        width: 100%;
    }

    /* Transform stacked gallery into horizontal scroll */
    .gallery-image-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.75rem;
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }

    .gallery-image-container::-webkit-scrollbar {
        display: none;
    }

    /* All images visible in horizontal strip */
    .gallery-image {
        position: relative !important;
        flex: 0 0 auto !important;
        width: 200px !important;
        height: 260px !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        scroll-snap-align: start;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transition: transform 0.2s ease;
    }

    /* Remove stacking classes effect */
    .gallery-image.active,
    .gallery-image.stack-1,
    .gallery-image.stack-2 {
        opacity: 1 !important;
        transform: none !important;
        z-index: auto !important;
    }

    /* Hide gallery controls on mobile */
    .gallery-controls {
        display: none !important;
    }

    /* ========== SKILLS ========== */
    .skills {
        padding: 4rem 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.875rem;
    }

    .skill-card {
        padding: 1rem;
    }

    .skill-card-title {
        font-size: 0.75rem;
        margin-bottom: 0.625rem;
    }

    .skill-tags span {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    /* ========== EXPERIENCE — Vertical Stack ========== */
    .experience {
        padding: 4rem 1.5rem;
    }

    .exp-header {
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .exp-nav {
        display: none;
    }

    .exp-title {
        font-size: 1.75rem;
    }

    .exp-subtitle {
        font-size: 0.9375rem;
    }

    /* Convert to vertical stack */
    .exp-scroll-container {
        display: block;
        padding: 0;
        overflow: visible;
    }

    .exp-track {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .exp-card {
        flex: none;
        width: 100%;
        min-width: auto;
        padding: 1.25rem;
        border-radius: 12px;
        background: var(--off-white);
        border: 1px solid var(--light-gray);
    }

    .exp-card.exp-featured {
        background: var(--off-white);
        border: 2px solid var(--accent);
    }

    .exp-card.exp-featured .exp-role,
    .exp-card.exp-featured .exp-company,
    .exp-card.exp-featured .exp-desc,
    .exp-card.exp-featured .exp-date {
        color: var(--black);
    }

    .exp-card.exp-featured .exp-company {
        color: var(--dark-gray);
    }

    .card-number {
        display: none;
    }

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

    .card-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .card-date {
        font-size: 0.6875rem;
    }

    .card-role {
        font-size: 1rem;
        margin-bottom: 0.125rem;
    }

    .card-company {
        font-size: 0.8125rem;
        margin-bottom: 0.125rem;
    }

    .card-location {
        font-size: 0.6875rem;
        margin-bottom: 0.5rem;
    }

    .card-desc {
        font-size: 0.8125rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .card-bullets {
        margin-bottom: 0.75rem;
    }

    .card-bullets li {
        font-size: 0.75rem;
        line-height: 1.5;
        padding-left: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .card-bullets li::before {
        font-size: 0.4rem;
    }

    .card-tech {
        gap: 0.25rem;
    }

    .card-tech span {
        font-size: 0.5625rem;
        padding: 0.25rem 0.5rem;
    }

    /* ========== PUBLICATION — Horizontal Card with Stats on Side ========== */
    .publication {
        padding: 4rem 1.5rem;
    }

    .publication-title {
        font-size: 1.25rem;
    }

    /* Keep horizontal layout - stats on right */
    .publication-card {
        grid-template-columns: 1fr auto;
        gap: 1rem;
        padding: 1.25rem;
        align-items: start;
    }

    .publication-paper-title {
        font-size: 1.125rem;
    }

    .publication-venue {
        font-size: 0.8125rem;
    }

    .publication-location {
        font-size: 0.75rem;
    }

    .publication-description {
        font-size: 0.8125rem;
        display: none; /* Hide on mobile to save space */
    }

    .publication-link {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }

    .publication-right {
        flex-direction: column;
        gap: 0.75rem;
        min-width: 70px;
        padding: 0.75rem;
        background: var(--cream);
        border-radius: 8px;
    }

    .publication-stat {
        text-align: center;
        padding: 0;
        border: none;
    }

    .publication-stat .stat-value {
        font-size: 1rem;
    }

    .publication-stat .stat-label {
        font-size: 0.5rem;
    }

    /* ========== PROJECTS — Single Column Cards ========== */
    .work {
        padding: 4rem 1.5rem;
    }

    .work-title {
        font-size: 1.25rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card {
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        flex-direction: row;
        background: var(--off-white);
    }

    .project-image {
        width: 120px;
        min-width: 120px;
        height: auto;
        min-height: 120px;
    }

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

    .project-overlay {
        display: none;
    }

    .project-body {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .project-body h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }

    .project-body p {
        font-size: 0.75rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        flex: 1;
    }

    .project-tech {
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .project-tech span {
        font-size: 0.5625rem;
        padding: 0.1875rem 0.375rem;
    }

    .project-link {
        font-size: 0.75rem;
    }

    /* ========== CONTACT ========== */
    .contact {
        padding: 4rem 1.5rem;
    }

    .contact-header {
        margin-bottom: 2.5rem;
    }

    .contact-title {
        font-size: 1.75rem;
    }

    .contact-subtitle {
        font-size: 0.9375rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-left {
        gap: 1rem;
    }

    .contact-card {
        padding: 1rem;
    }

    .contact-card-value {
        font-size: 0.9375rem;
    }

    .contact-socials {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .social-link {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .contact-right {
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.9375rem;
        padding: 0.75rem;
    }

    .form-submit {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    /* ========== FOOTER ========== */
    .footer {
        padding: 1.25rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-content p {
        font-size: 0.8125rem;
    }
}

/* ============================================
   RESPONSIVE — Small Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 2rem;
    }

    .hero-image-wrapper {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px !important;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .hero-tagline {
        font-size: 0.875rem;
        max-width: 300px;
    }

    .hero-education {
        font-size: 0.8125rem;
    }

    .hero-cta {
        max-width: 100%;
    }

    .about {
        padding: 3rem 1rem;
    }

    .gallery-image-container {
        height: 280px;
    }

    .about-lead {
        font-size: 1rem;
    }

    .skills {
        padding: 3rem 1rem;
    }

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

    .experience {
        padding: 3rem 1rem;
    }

    .exp-card {
        padding: 1rem;
    }

    .publication {
        padding: 3rem 1rem;
    }

    .publication-right {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .publication-stat {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--light-gray);
    }

    .publication-stat:last-child {
        border-bottom: none;
    }

    .work {
        padding: 3rem 1rem;
    }

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

    .project-image {
        height: 160px;
    }

    .project-body p {
        -webkit-line-clamp: 3;
    }

    .contact {
        padding: 3rem 1rem;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .social-link {
        min-width: 100%;
    }

    /* Nav dropdown on small screens */
    .nav-links a {
        font-size: 1.125rem;
        padding: 0.875rem 0;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
