/* ===========================
   Reset & Base — Apple-style
   =========================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0071e3;
    --primary-hover: #0077ed;
    --primary-pressed: #006edb;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-light: #757579; /* lightest gray that still passes WCAG AA (4.5:1) on white at small sizes */

    --bg-primary: #ffffff;
    --bg-secondary: #fbfbfd;
    --bg-tertiary: #f5f5f7;
    --bg-dark: #1d1d1f;

    --border-color: #d2d2d7;
    --border-strong: #1d1d1f;

    --success-color: #248a3d;
    --error-color: #b8001f;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 14px 28px -8px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-pill: 980px;

    --ease-apple: cubic-bezier(0.28, 0, 0.49, 1);
    --transition: 0.4s var(--ease-apple);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Arial", sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    font-weight: 400;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ===========================
   Accessibility
   =========================== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Blue outline is invisible on the blue CTA background */
.cta-section *:focus-visible {
    outline-color: #ffffff;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 2000;
    padding: 10px 18px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    font-size: 15px;
}

.skip-link:focus {
    top: 12px;
}

/* ===========================
   Navigation — apple.com style
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    padding: 0;
    height: 48px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1024px;
}

.nav-brand a {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.3s var(--ease-apple);
}

.nav-brand a:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    opacity: 0.88;
    transition: opacity 0.3s var(--ease-apple);
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link.active {
    font-weight: 500;
}

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

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: var(--transition);
    transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    transition: var(--transition);
    font-size: 13px;
    letter-spacing: -0.01em;
}

.lang-btn:hover {
    border-color: var(--text-primary);
}

.lang-arrow {
    font-size: 9px;
    transition: transform 0.3s var(--ease-apple);
    opacity: 0.5;
}

.lang-arrow.rotate {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 6px;
    min-width: 168px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu li {
    margin: 0;
}

.lang-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease-apple);
}

.lang-menu a:hover {
    background: var(--bg-tertiary);
}

/* ===========================
   Hero — centred, big, airy
   =========================== */
.hero {
    padding: 120px 0 100px;
    background: var(--bg-primary);
    text-align: center;
    min-height: 92vh;
    display: flex;
    align-items: center;
}

.hero .container {
    max-width: 980px;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero-title {
    font-size: 80px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    max-width: 14ch;
    margin: 0 auto;
}

.hero-title .highlight {
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: var(--primary-color);
}

.hero-subtitle {
    font-size: 28px;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.14;
}

.hero-description {
    font-size: 21px;
    color: var(--text-secondary);
    line-height: 1.38;
    letter-spacing: 0.011em;
    max-width: 620px;
    margin: 0 auto;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ===========================
   Hero device stage — large iPhone mockup under hero
   =========================== */
.hero-stage {
    padding: 24px 0 96px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
    position: relative;
}

.hero-stage .container {
    display: flex;
    justify-content: center;
    perspective: 2400px;
}

.device-mockup {
    --device-w: 320px;
    --device-h: 660px;
    --device-radius: 50px;
    --bezel-thickness: 11px;

    position: relative;
    width: var(--device-w);
    height: var(--device-h);
    flex-shrink: 0;
    transform-style: preserve-3d;
    transition: transform 0.6s var(--ease-apple);
    will-change: transform;
}

.device-shell {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #2a2a2c 0%, #0d0d0f 100%);
    border-radius: var(--device-radius);
    padding: var(--bezel-thickness);
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.08) inset,
        0 60px 100px -40px rgba(10, 132, 255, 0.4),
        0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.device-shell::after {
    /* side highlights */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--device-radius);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 8%, transparent 92%, rgba(255, 255, 255, 0.12));
    pointer-events: none;
}

.device-island {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 30px;
    background: #000;
    border-radius: 16px;
    z-index: 3;
}

.device-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--device-radius) - var(--bezel-thickness) - 2px);
    overflow: hidden;
    background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%);
    color: white;
    isolation: isolate;
}

.device-screen::before {
    /* soft glare */
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent 70%);
    filter: blur(4px);
    pointer-events: none;
    z-index: 1;
}

.screen-content {
    position: relative;
    z-index: 2;
    padding: 64px 24px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.screen-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.78;
    margin-bottom: 12px;
}

.screen-title {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 16px;
}

.screen-stat-row {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.screen-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.screen-stat strong {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-feature-settings: "tnum";
    line-height: 1.05;
}

.screen-stat span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.screen-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 18px;
}

.screen-pill {
    background: rgba(255, 255, 255, 0.18);
    border: 0.5px solid rgba(255, 255, 255, 0.24);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.005em;
}

@media (max-width: 768px) {
    .device-mockup {
        --device-w: 240px;
        --device-h: 500px;
        --device-radius: 38px;
        --bezel-thickness: 8px;
    }
    .device-island { width: 80px; height: 22px; top: 12px; }
    .screen-content { padding: 48px 18px 18px; }
    .screen-title { font-size: 22px; }
    .screen-stat strong { font-size: 17px; }
    .hero-stage { padding: 16px 0 64px; }
}

/* ===========================
   Parallax tilt — for cards on mouse-move
   Just transforms; JS adds inline --tilt-x/--tilt-y
   =========================== */
.tilt {
    transform: perspective(1000px)
               rotateX(var(--tilt-x, 0deg))
               rotateY(var(--tilt-y, 0deg))
               translate3d(0, 0, 0);
    transition: transform 0.5s var(--ease-apple);
    will-change: transform;
}

.tilt:hover {
    transition: transform 0.15s ease-out;
}

/* ===========================
   Buttons — pill + flat
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 400;
    font-size: 17px;
    letter-spacing: -0.012em;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.18;
    min-height: 44px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    background: var(--primary-pressed);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: white;
}

/* CTA section override (white-on-blue) */
.cta-section .btn {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.cta-section .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

/* ===========================
   Sections
   =========================== */
section {
    padding: 96px 0;
}

.section-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 56px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.08;
}

/* Small-caps eyebrow above section titles — apple.com pattern */
.eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    font-feature-settings: "tnum";
}

/* Section header (eyebrow + title + optional intro) */
.section-header {
    max-width: 780px;
    margin: 0 auto 56px;
    text-align: left;
}

.section-header.is-centred {
    text-align: center;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.08;
    color: var(--text-primary);
    margin: 0;
}

.section-header p {
    font-size: 21px;
    color: var(--text-secondary);
    line-height: 1.38;
    letter-spacing: 0.011em;
    margin-top: 16px;
    max-width: 56ch;
}

.section-header.is-centred p {
    margin-left: auto;
    margin-right: auto;
}

/* Inline arrow link — apple.com text CTA */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.012em;
    transition: opacity 0.2s var(--ease-apple);
    margin-top: 24px;
}

.arrow-link::after {
    content: "→";
    transition: transform 0.3s var(--ease-apple);
}

.arrow-link:hover {
    opacity: 0.7;
}

.arrow-link:hover::after {
    transform: translateX(3px);
}

/* ===========================
   Page Header (sub-pages)
   =========================== */
.page-header {
    padding: 140px 0 64px;
    background: var(--bg-primary);
    text-align: center;
}

.page-header h1 {
    font-size: 64px;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.07;
}

.page-subtitle {
    font-size: 21px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    letter-spacing: 0.011em;
    line-height: 1.38;
}

/* ===========================
   Featured work (home) — 1 large + 2 small
   =========================== */
.featured-work {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.featured-card {
    display: block;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.featured-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.featured-card .project-image {
    height: 280px;
}

.featured-card.is-feature .project-image {
    height: 360px;
}

.featured-card .project-content {
    padding: 28px 28px 32px;
}

.featured-card .featured-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    font-feature-settings: "tnum";
}

.featured-card h3 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.12;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.featured-card.is-feature h3 {
    font-size: 36px;
}

.featured-card p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.47;
    letter-spacing: -0.005em;
    margin: 0;
}

.featured-card .featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 400;
}

.featured-card .featured-cta::after {
    content: "→";
    transition: transform 0.3s var(--ease-apple);
}

.featured-card:hover .featured-cta::after {
    transform: translateX(3px);
}

/* ===========================
   About teaser (home) — short profile block
   =========================== */
.about-teaser {
    padding: 96px 0;
    background: var(--bg-primary);
}

.about-teaser-content {
    max-width: 780px;
    margin: 0 auto;
}

.about-teaser h2 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 12px 0 20px;
    color: var(--text-primary);
}

.about-teaser p {
    font-size: 21px;
    color: var(--text-secondary);
    line-height: 1.42;
    letter-spacing: 0.011em;
    max-width: 56ch;
}

/* ===========================
   About
   =========================== */
.about {
    background: var(--bg-primary);
}

.about-text {
    max-width: 720px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.022em;
    margin: 64px 0 20px;
    line-height: 1.1;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text p {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    letter-spacing: 0.005em;
}

.about-cv {
    margin: 32px 0 8px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin: 96px auto 0;
    max-width: 980px;
    padding-top: 56px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.stat-number {
    font-size: 64px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.025em;
    line-height: 1.08;
    font-feature-settings: "tnum";
}

.stat-label {
    color: var(--text-secondary);
    font-size: 15px;
    letter-spacing: -0.005em;
}

/* ===========================
   Experience list (about) — apple.com/leadership pattern
   Date column · role + description column
   =========================== */
.experience-list {
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

.experience-entry {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: start;
}

.experience-date {
    font-size: 14px;
    color: var(--text-light);
    font-feature-settings: "tnum";
    letter-spacing: 0.005em;
    padding-top: 4px;
}

.experience-entry h3 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.016em;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.experience-entry p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.47;
    letter-spacing: -0.005em;
    margin: 0;
}

@media (max-width: 768px) {
    .experience-entry {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .experience-date {
        padding-top: 0;
    }
    .experience-entry h3 {
        font-size: 19px;
    }
}

/* ===========================
   Education
   =========================== */
.education-list {
    margin-top: 16px;
}

.education-item {
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}

.education-item h3 {
    font-size: 19px;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -0.014em;
}

.education-item p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.education-year {
    color: var(--text-light) !important;
    font-size: 14px !important;
    margin-top: 4px;
    font-feature-settings: "tnum";
}

/* ===========================
   Skills — Apple-specs pattern
   Sticky meta-column + tag wall, alternating bg
   =========================== */
.pillar {
    padding: 120px 0;
    border-top: 1px solid var(--border-color);
}

.pillar:first-of-type {
    border-top: none;
}

.pillar.pillar-alt {
    background: var(--bg-secondary);
    border-top-color: transparent;
}

.pillar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 80px;
    align-items: start;
    max-width: 1024px;
    margin: 0 auto;
}

.pillar-meta {
    position: sticky;
    top: 88px;
    align-self: start;
}

.pillar-num {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 20px;
    font-feature-settings: "tnum";
}

.pillar-meta h2 {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.pillar-meta p {
    font-size: 19px;
    color: var(--text-secondary);
    line-height: 1.5;
    letter-spacing: 0.005em;
    max-width: 32ch;
}

.pillar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pillar-tag {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.005em;
    transition: var(--transition);
    cursor: default;
    user-select: none;
}

.pillar-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

.pillar.pillar-alt .pillar-tag {
    background: var(--bg-primary);
}

/* ===========================
   Time spent — apple.com/iphone/specs
   =========================== */
.experience {
    padding: 120px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.experience-header {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.experience h2 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.08;
    margin-bottom: 16px;
}

.experience-subtitle {
    font-size: 21px;
    color: var(--text-secondary);
    line-height: 1.38;
    letter-spacing: 0.011em;
}

.experience-table {
    max-width: 720px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.experience-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 24px;
}

.experience-row dt {
    font-size: 19px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.012em;
}

.experience-row dd {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0;
    font-feature-settings: "tnum";
    letter-spacing: -0.005em;
    text-align: right;
    white-space: nowrap;
}

.experience-row dd em {
    font-style: normal;
    color: var(--text-light);
    font-size: 14px;
}

@media (max-width: 768px) {
    .pillar { padding: 64px 0; }
    .pillar-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .pillar-meta {
        position: static;
    }
    .pillar-meta h2 { font-size: 36px; }
    .pillar-meta p { font-size: 17px; max-width: none; }
    .pillar-tag { font-size: 14px; padding: 8px 14px; }

    .experience { padding: 64px 0; }
    .experience h2 { font-size: 32px; }
    .experience-subtitle { font-size: 17px; }
    .experience-row { padding: 18px 0; }
    .experience-row dt { font-size: 17px; }
    .experience-row dd { font-size: 15px; }
}

/* ===========================
   Projects
   =========================== */
.projects {
    background: var(--bg-primary);
}

.projects-filter {
    padding: 24px 0 8px;
    background: var(--bg-primary);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: -0.005em;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--text-primary);
}

.filter-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.project-card.is-featured .project-image {
    height: 380px;
}

.project-card.is-featured .project-wordmark {
    font-size: 84px;
}

.project-card.is-featured .project-content {
    padding: 32px 36px 36px;
}

.project-card.is-featured .project-title {
    font-size: 32px;
}

.project-card.is-featured .project-description {
    font-size: 17px;
    max-width: 640px;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-primary);
}

/* Project cover with wordmark */
.project-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-wordmark {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: white;
    text-align: center;
    line-height: 1;
    padding: 0 24px;
}

.project-wordmark small {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 12px;
}

/* Per-project gradients */
.project-image.cover-wimix     { background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%); }
.project-image.cover-enterprise{ background: linear-gradient(135deg, #2c2c2e 0%, #6e6e73 100%); }
.project-image.cover-sdk       { background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%); }
.project-image.cover-flutter   { background: linear-gradient(135deg, #5856d6 0%, #af52de 100%); }
.project-image.cover-payments  { background: linear-gradient(135deg, #34c759 0%, #00c7be 100%); }
.project-image.cover-realtime  { background: linear-gradient(135deg, #af52de 0%, #ff375f 100%); }

.project-content {
    padding: 24px 28px 28px;
}

.project-title {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.016em;
    line-height: 1.2;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.47;
    font-size: 15px;
    letter-spacing: -0.005em;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.003em;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    transition: opacity 0.2s var(--ease-apple);
}

.project-link:hover {
    opacity: 0.7;
}

.project-link.is-disabled {
    color: var(--text-light);
    pointer-events: none;
    cursor: not-allowed;
}

.project-card.hidden { display: none; }

/* ===========================
   Contact — central column, prominent email
   =========================== */
.contact {
    background: var(--bg-primary);
}

.contact-stack {
    max-width: 720px;
    margin: 0 auto;
}

.contact-stack > * + * {
    margin-top: 56px;
}

/* Prominent email link — apple.com support pattern */
.contact-primary {
    text-align: center;
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.contact-primary .eyebrow {
    margin-bottom: 16px;
}

.contact-primary a {
    font-size: clamp(24px, 6.5vw, 40px);
    overflow-wrap: anywhere;
    font-weight: 600;
    letter-spacing: -0.022em;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s var(--ease-apple);
    display: inline-block;
}

.contact-primary a:hover {
    color: var(--primary-color);
}

/* Small-caps group labels inside the contact stack */
.stack-label {
    font-size: 13px;
    margin: 0 0 8px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
}

.contact-method {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s var(--ease-apple);
    border-bottom: 1px solid var(--border-color);
}

.contact-method:hover {
    opacity: 0.65;
}

.contact-method-label {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.012em;
}

.contact-method-value {
    color: var(--text-secondary);
    font-size: 15px;
    letter-spacing: -0.005em;
    text-align: right;
}

.contact-method-arrow {
    color: var(--text-light);
    font-size: 14px;
    margin-left: 8px;
    transition: transform 0.3s var(--ease-apple);
}

.contact-method:hover .contact-method-arrow {
    transform: translateX(3px);
}

.availability-info {
    margin-top: 8px;
}

.availability-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.availability-item strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.012em;
}

.availability-item p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
    letter-spacing: -0.005em;
}

/* ===========================
   Location
   =========================== */
.location-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.location-section h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.022em;
}

.location-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0;
    background: transparent;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    flex-direction: column;
}

.location-info h3 {
    font-size: 28px;
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: -0.018em;
}

.location-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 17px;
}

/* ===========================
   CTA Section — accent block
   =========================== */
.cta-section {
    padding: 96px 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.08;
    color: white;
}

.cta-section p {
    font-size: 21px;
    margin-bottom: 28px;
    opacity: 0.92;
    letter-spacing: 0.011em;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 28px 0;
    font-size: 12px;
    border-top: 1px solid var(--border-color);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1024px;
}

.footer p {
    margin: 0;
    letter-spacing: -0.003em;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: opacity 0.2s var(--ease-apple);
    font-size: 12px;
}

.footer-links a:hover {
    opacity: 0.7;
    color: var(--text-primary);
}

/* ===========================
   Fade-in via IntersectionObserver
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-apple), transform 0.7s var(--ease-apple);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s var(--ease-apple) backwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
    .hero-title { font-size: 64px; }
    .page-header h1 { font-size: 56px; }
    .section-title,
    .cta-section h2 { font-size: 40px; }
    .stat-number { font-size: 56px; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        width: 100%;
        padding: 24px 22px;
        border-bottom: 1px solid var(--border-color);
        align-items: flex-start;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        /* visibility keeps the closed menu out of the tab order */
        visibility: hidden;
        transition: var(--transition), visibility 0.4s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        font-size: 18px;
        padding: 12px 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle {
        display: flex;
    }

    .language-selector {
        margin-top: 12px;
        width: 100%;
    }

    .lang-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }

    .lang-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 8px;
        background: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
    }

    .hero { padding: 96px 0 64px; min-height: auto; }
    .hero-title { font-size: 44px; max-width: none; }
    .hero-subtitle { font-size: 22px; }
    .hero-description { font-size: 17px; }

    .page-header { padding: 96px 0 48px; }
    .page-header h1 { font-size: 40px; }

    section { padding: 64px 0; }

    .section-title,
    .cta-section h2 { font-size: 32px; }

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

    .featured-card.is-feature {
        grid-column: auto;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-top: 64px;
    }

    .stat-number { font-size: 44px; }

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

    .project-image { height: 180px; }
    .project-wordmark { font-size: 40px; }

    .about-text h2 { font-size: 28px; margin-top: 48px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 36px; }
    .page-header h1 { font-size: 32px; }
    .btn { width: 100%; }
    .hero-buttons { width: 100%; flex-direction: column; }
    .about-stats { grid-template-columns: 1fr; }
}

/* ===========================
   Reduced motion
   =========================== */
@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;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
