/* =============================================
   Vedanth Gowda — Student Portfolio
   Light · Editorial · Teal & Coral
   Jain College, Bangalore · 1st PUC
   ============================================= */

:root {
    --color-bg:         #faf9f7;
    --color-bg-alt:     #f0ede8;
    --color-surface:    #ffffff;
    --color-border:     rgba(15, 23, 42, 0.08);
    --color-text:       #1e293b;
    --color-muted:      #64748b;
    --color-accent:     #0d9488;
    --color-accent-2:   #14b8a6;
    --color-coral:      #f97316;
    --color-coral-light:#fb923c;
    --gradient-main:    linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    --gradient-warm:    linear-gradient(135deg, #f97316, #fb923c);
    --font-body:        'Outfit', system-ui, sans-serif;
    --font-display:     'Playfair Display', Georgia, serif;
    --radius-sm:        8px;
    --radius-md:        16px;
    --radius-lg:        24px;
    --radius-full:      9999px;
    --shadow-card:      0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg:        0 12px 40px rgba(15, 23, 42, 0.12);
    --nav-height:       72px;
    --nav-height-mobile: 64px;
    --transition:       0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-padding: clamp(16px, 4vw, 24px);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.nav-open {
    overflow: hidden;
    touch-action: none;
}

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

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

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: max(var(--container-padding), env(safe-area-inset-left, 0px));
    padding-right: max(var(--container-padding), env(safe-area-inset-right, 0px));
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    min-height: 48px;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
    outline: none;
}

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

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--color-accent);
    color: var(--color-accent);
    outline: none;
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(250, 249, 247, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.site-header.scrolled {
    box-shadow: var(--shadow-card);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: max(var(--container-padding), env(safe-area-inset-left, 0px));
    padding-right: max(var(--container-padding), env(safe-area-inset-right, 0px));
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo-mark {
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-logo-text {
    font-weight: 700;
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    letter-spacing: -0.02em;
    color: var(--color-text);
    line-height: 1.2;
}

.nav-logo:hover .site-logo-mark,
.nav-logo:focus-visible .site-logo-mark {
    transform: scale(1.05);
    outline: none;
}

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

.nav-link {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-muted);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--color-text);
    outline: none;
}

.nav-link.active {
    color: var(--color-accent);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-coral);
    border-radius: 50%;
}

.nav-link-cta {
    background: var(--gradient-main) !important;
    color: #fff !important;
    padding: 8px 20px !important;
    margin-left: 8px;
}

.nav-link-cta::after {
    display: none !important;
}

.nav-link-cta:hover,
.nav-link-cta:focus-visible {
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   HERO — Profile photo layout
   ============================================= */
.hero-profile {
    position: relative;
    padding: calc(var(--nav-height) + 48px) 0 56px;
    overflow: hidden;
}

.hero-profile-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(160deg, rgba(13, 148, 136, 0.07) 0%, var(--color-bg) 45%, rgba(249, 115, 22, 0.05) 100%);
}

.hero-profile-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
}

.hero-profile-shape-1 {
    width: 420px;
    height: 420px;
    background: rgba(13, 148, 136, 0.18);
    top: -80px;
    right: -60px;
}

.hero-profile-shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(249, 115, 22, 0.12);
    bottom: 0;
    left: -40px;
}

.hero-profile-inner {
    position: relative;
    z-index: 1;
}

.hero-profile-grid {
    display: grid;
    grid-template-columns: 1fr minmax(0, 360px);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 48px);
    box-shadow: var(--shadow-lg);
}

.hero-banner-content {
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    color: var(--color-accent);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    font-weight: 500;
    margin-bottom: 20px;
    max-width: 100%;
    flex-wrap: wrap;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    color: var(--color-muted);
    max-width: 520px;
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Profile photo frame */
.hero-photo-frame {
    margin: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.hero-photo-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: clamp(4px, 1vw, 6px);
    background: var(--gradient-main);
    border-radius: var(--radius-lg);
    box-shadow:
        0 20px 40px rgba(13, 148, 136, 0.22),
        0 8px 16px rgba(15, 23, 42, 0.08);
}

.hero-photo-wrap::before {
    content: '';
    position: absolute;
    inset: clamp(-6px, -1.5vw, -12px);
    border: 2px dashed rgba(13, 148, 136, 0.25);
    border-radius: calc(var(--radius-lg) + 8px);
    pointer-events: none;
}

.hero-photo-inner {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 4px);
    background: var(--color-bg-alt);
}

.hero-profile-photo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.hero-photo-caption {
    text-align: center;
    width: 100%;
}

.card-college {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.card-location {
    color: var(--color-muted);
    font-size: 0.88rem;
}

.hero-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.hero-stats-bar .stat-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-coral);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: 88px 0;
}

.section-header {
    margin-bottom: 48px;
}

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

.section-header-center .section-desc {
    margin: 10px auto 0;
    max-width: 520px;
}

.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-desc {
    color: var(--color-muted);
    font-size: 1rem;
    margin-top: 8px;
}

/* --- About --- */
.about-preview {
    background: var(--color-bg-alt);
}

.about-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}

.about-body {
    max-width: 780px;
    margin: 0 auto 40px;
}

.about-body p {
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.about-body p:last-child {
    margin-bottom: 0;
}

.about-body strong {
    color: var(--color-text);
}

.interests-block {
    margin-top: 48px;
    text-align: center;
}

.interests-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.interests-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
}

.interests-list .tag {
    background: rgba(13, 148, 136, 0.1);
    color: var(--color-accent);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.academics-note {
    margin-top: 32px;
    text-align: center;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.activities-grid-four {
    grid-template-columns: repeat(2, 1fr);
}

.looking-ahead-preview {
    background: var(--color-surface);
}

.looking-ahead-body {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.looking-ahead-body p {
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.looking-ahead-body strong {
    color: var(--color-text);
}

.looking-ahead-closing {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-accent) !important;
    margin-top: 8px;
}

.about-lead {
    font-size: 1.15rem;
    color: var(--color-muted);
    line-height: 1.75;
}

.about-lead strong {
    color: var(--color-text);
}

.about-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 148, 136, 0.25);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-card p {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* --- Academics bento --- */
.subjects-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.subject-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.subject-card-featured {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--gradient-main);
    color: #fff;
    border: none;
}

.subject-card p {
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.subject-card-featured h3,
.subject-card-featured p {
    color: #ffffff;
}

.subject-card-featured p {
    color: rgba(255, 255, 255, 0.92);
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.subject-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.subject-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* --- Activities grid --- */
.activities-preview {
    background: var(--color-bg-alt);
}

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

.activity-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-warm);
    opacity: 0;
    transition: var(--transition);
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.activity-card-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-coral);
    line-height: 1;
    margin-bottom: 12px;
    display: block;
    opacity: 0.9;
}

.activity-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.activity-card p {
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* --- Highlights — Achievements & Skills --- */
.highlights-preview {
    background: var(--color-bg-alt);
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.highlights-subtitle {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text);
}

.achievements-block,
.skills-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.achievements-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.achievement-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}

.achievement-item:first-child {
    padding-top: 0;
}

.achievement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.achievement-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.achievement-item p {
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.skill-level {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skill-bar {
    height: 8px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-fill {
    display: block;
    height: 100%;
    width: 0;
    min-width: 0;
    background: var(--gradient-main);
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
}

.learning-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.learning-label {
    font-size: 0.82rem;
    color: var(--color-muted);
    font-weight: 500;
    margin-right: 4px;
}

.highlights-preview .tag {
    background: rgba(13, 148, 136, 0.1);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

/* --- Contact split --- */
.contact-preview {
    background: var(--color-bg-alt);
}

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.contact-split-content {
    padding: 56px 48px;
}

.contact-split-content p {
    color: var(--color-muted);
    margin: 14px 0 28px;
    max-width: 400px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-muted);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    transition: var(--transition);
    max-width: 100%;
    word-break: break-word;
}

a.contact-link {
    cursor: pointer;
}

a.contact-link:hover,
a.contact-link:focus-visible {
    color: var(--color-accent);
    outline: none;
}

.contact-link-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.contact-split-visual {
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.contact-wave {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathe 3s ease-in-out infinite;
}

.contact-emoji {
    font-size: 3.5rem;
}

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

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 36px 0;
    padding-bottom: max(36px, env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-brand p {
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-domain {
    color: var(--color-accent);
    font-weight: 500;
    transition: var(--transition);
}

.footer-domain:hover,
.footer-domain:focus-visible {
    color: var(--color-accent-2);
    outline: none;
}

.footer-logo .site-logo-mark {
    width: 36px;
    height: 36px;
}

.footer-logo .nav-logo-text {
    font-size: 1.05rem;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: var(--color-accent);
    outline: none;
}

/* --- Scroll reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* =============================================
   RESPONSIVE — All devices
   ============================================= */

/* Large tablet / small desktop (≤1024px) */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(250, 249, 247, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: stretch;
        padding: 16px max(var(--container-padding), env(safe-area-inset-right, 0px)) 24px max(var(--container-padding), env(safe-area-inset-left, 0px));
        gap: 4px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition), transform var(--transition);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        padding: 14px 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav-link-cta {
        margin-left: 0 !important;
        justify-content: center;
        margin-top: 8px;
    }

    .hero-profile-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 36px;
    }

    .hero-photo-frame {
        order: 1;
        width: 100%;
        max-width: min(100%, 380px);
        margin: 0 auto;
    }

    .hero-photo-wrap {
        width: 100%;
        max-width: 100%;
    }

    .hero-banner-content {
        order: 2;
        text-align: center;
    }

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

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

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

    .subjects-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-card-featured {
        grid-row: span 1;
        grid-column: span 2;
    }

    .activities-grid-four {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .contact-split-content {
        padding: 40px 32px;
        text-align: center;
    }

    .contact-split-content p {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-details {
        align-items: center;
    }

    .contact-split-visual {
        min-height: 200px;
    }
}

/* Tablet portrait (≤768px) */
@media (max-width: 768px) {
    :root {
        --nav-height: var(--nav-height-mobile);
    }

    .section {
        padding: 72px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }

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

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

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

    .activities-grid,
    .activities-grid-four {
        grid-template-columns: 1fr;
    }

    .about-body {
        margin-bottom: 32px;
    }

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

    .achievements-block,
    .skills-block {
        padding: 24px 20px;
    }

    .activity-card {
        padding: 24px 20px;
    }

    .hero-profile {
        padding: calc(var(--nav-height) + 32px) 0 40px;
    }

    .hero-profile-grid {
        padding: 28px 24px;
        border-radius: var(--radius-md);
    }

    .hero-photo-frame {
        max-width: min(100%, 340px);
    }

    .hero-stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .hero-stats-bar .stat-item {
        padding: 16px 12px;
    }

    .stat-number {
        font-size: 1.35rem;
    }

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

    .footer-brand {
        align-items: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .section {
        padding: 56px 0;
    }

    .nav-logo-text {
        font-size: 1rem;
    }

    .site-logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero-profile {
        padding: calc(var(--nav-height) + 24px) 0 32px;
    }

    .hero-profile-grid {
        padding: 24px 18px;
        gap: 28px;
    }

    .hero-photo-frame {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(1.85rem, 8vw, 2.4rem);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subjects-bento {
        grid-template-columns: 1fr;
    }

    .info-card {
        padding: 22px 18px;
    }

    .contact-split-content {
        padding: 28px 20px;
    }

    .contact-split-visual {
        min-height: 160px;
    }

    .contact-wave {
        width: 90px;
        height: 90px;
    }

    .contact-emoji {
        font-size: 2.5rem;
    }

    .achievement-item {
        gap: 12px;
    }

    .skill-header {
        flex-wrap: wrap;
        gap: 4px;
    }

    .learning-tags {
        justify-content: center;
    }
}

/* Small mobile (≤360px) */
@media (max-width: 360px) {
    .nav-logo-text {
        font-size: 0.92rem;
    }

    .hero-badge {
        padding: 6px 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.88rem;
    }

    .section-title {
        font-size: 1.55rem;
    }
}

/* Landscape phones — compact hero */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-profile {
        padding: calc(var(--nav-height) + 16px) 0 24px;
    }

    .hero-profile-grid {
        grid-template-columns: 1fr minmax(0, 220px);
        gap: 24px;
        padding: 20px;
    }

    .hero-photo-frame {
        order: 0;
        max-width: 100%;
    }

    .hero-banner-content {
        order: 0;
        text-align: left;
    }

    .hero-photo-inner {
        aspect-ratio: 3 / 4;
    }

    .nav-menu {
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 1025px) {
    .activities-grid-four {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1400px) {
    .container,
    .nav-container {
        max-width: 1200px;
    }
}

/* Reduce motion for accessibility */
@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;
    }

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