/* ================================================================
   IAN CONLON — PERSONAL WEBSITE
   Inspired by the Duke Campaign (madeforthis.duke.edu)
   Palette: Duke Navy · Duke Gold (#FDD960) · White
================================================================ */

/* ----------------------------------------------------------------
   1. CUSTOM PROPERTIES
---------------------------------------------------------------- */
:root {
    /* Duke palette — campaign-accurate */
    --navy:         #003087;   /* Duke Blue */
    --navy-deep:    #021E6B;   /* Campaign hero dark */
    --navy-darker:  #011040;   /* Deepest navy */
    --navy-mid:     #0547A0;   /* Royal blue */
    --navy-light:   #C0D4EA;   /* Pale steel blue */
    --navy-subtle:  #EBF1FA;   /* Tinted white */

    /* Gold — #FDD960 from the Duke campaign site */
    --gold:         #FDD960;
    --gold-dark:    #e5c440;   /* Hover/pressed gold */
    --gold-glow:    rgba(253, 217, 96, 0.30);

    /* UNC — for the Reversi easter egg */
    --unc-blue:     #4B9CD3;   /* UNC Carolina Blue */

    /* Neutrals */
    --white:        #FFFFFF;
    --off-white:    #F7F9FC;
    --gray-50:      #EEF2F8;
    --gray-200:     #DDE3EF;
    --gray-400:     #9AA5BC;
    --gray-600:     #5C6680;
    --dark:         #0B1728;

    /* Text */
    --text:         #1C2A3A;
    --text-hero:    rgba(226, 230, 237, 1); /* Duke campaign light heading color */

    /* Shadows */
    --shadow-sm:    0 2px 8px  rgba(0, 48, 135, 0.07);
    --shadow-md:    0 6px 24px rgba(0, 48, 135, 0.11);
    --shadow-lg:    0 16px 48px rgba(0, 48, 135, 0.18);
    --shadow-gold:  0 8px 28px rgba(253, 217, 96, 0.35);

    /* Motion */
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --section-py:   112px;
    --container:    1160px;
    --radius:       14px;

    /* Dots */
    --dot-size:     13px;
    --dot-gap:      7px;
}

/* ----------------------------------------------------------------
   2. RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ----------------------------------------------------------------
   3. TYPOGRAPHY HELPERS
---------------------------------------------------------------- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 14px;
}

/* Gold rule before section labels */
.section-label::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(30px, 5vw, 46px);
    color: var(--dark);
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-title em {
    font-style: italic;
    color: var(--navy);
}

.section-subtitle {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.75;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-header .section-label {
    justify-content: center;
}

.section-header .section-label::before {
    display: none; /* No rule for centered labels */
}

.section-header .section-label::after {
    content: '';
    display: inline-block;
    width: 32px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-header .section-subtitle {
    max-width: 580px;
    margin: 0 auto;
}

/* ----------------------------------------------------------------
   4. LAYOUT
---------------------------------------------------------------- */
.section { padding: var(--section-py) 0; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

/* ----------------------------------------------------------------
   5. NAVBAR
---------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    padding: 22px 0;
    transition: padding .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}

.navbar.scrolled {
    background: rgba(2, 30, 107, 0.96); /* Dark navy, campaign style */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 14px 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 4px 24px rgba(0,0,0,0.25);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Initials badge */
.initials {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    transition: all 0.3s var(--ease);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: 9999px;   /* pill — campaign style */
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s var(--ease);
    color: rgba(255, 255, 255, 0.80);
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

/* Nav CTA pill */
.nav-links .nav-cta {
    background: var(--gold);
    color: var(--navy-deep) !important;
    font-weight: 700;
    padding: 8px 22px;
}

.nav-links .nav-cta:hover {
    background: var(--gold-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

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

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transition: all 0.3s var(--ease);
    transform-origin: center;
}

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

/* ----------------------------------------------------------------
   6. HERO — Duke campaign deep navy
---------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    /* Campaign-accurate: deep navy #021E6B */
    background: linear-gradient(155deg, var(--navy-darker) 0%, var(--navy-deep) 45%, #003087 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Dot-grid overlay */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

/* Ambient glow blobs */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
}

.hero-glow-1 {
    width: 700px;
    height: 700px;
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(253, 217, 96, 0.07) 0%, transparent 70%);
}

.hero-glow-2 {
    width: 600px;
    height: 600px;
    bottom: -100px;
    left: -80px;
    background: radial-gradient(circle, rgba(7, 54, 164, 0.35) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 24px;
    max-width: 860px;
}

/* Campaign badge — gold-accented */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(253, 217, 96, 0.35);
    background: rgba(253, 217, 96, 0.08);
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
}

.hero-badge i { opacity: 0.8; }

/* Name — large Playfair serif */
.hero-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(54px, 11vw, 96px);
    color: var(--text-hero);
    line-height: 1.02;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}

/* Gold divider line — campaign accent */
.hero-divider {
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0 auto 20px;
    box-shadow: 0 0 12px rgba(253, 217, 96, 0.5);
}

.hero-title {
    font-size: clamp(17px, 3vw, 23px);
    color: rgba(226, 230, 237, 0.85);
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
}

.hero-tagline {
    font-size: clamp(14px, 1.8vw, 17px);
    color: var(--navy-light);
    opacity: 0.75;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 48px;
}

/* Hero CTAs */
.hero-ctas {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- BUTTONS — campaign pill style ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 9999px;  /* campaign: fully rounded pill */
    font-size: 15px;
    font-weight: 700;
    transition: all 0.25s var(--ease);
    cursor: pointer;
    border: none;
    text-decoration: none;
    letter-spacing: 0.2px;
}

/* Gold primary — signature Duke campaign button */
.btn-gold {
    background: var(--gold);
    color: var(--navy-deep);
}

.btn-gold:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* White outline */
.btn-outline {
    background: rgba(255, 255, 255, 0.10);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.38);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.60);
    transform: translateY(-2px);
}

/* Navy solid */
.btn-navy {
    background: var(--navy);
    color: var(--white);
}

.btn-navy:hover {
    background: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(253, 217, 96, 0.45);
    font-size: 10.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2.2s ease-in-out infinite;
    z-index: 1;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0);  }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* ----------------------------------------------------------------
   7. ABOUT SECTION — circular photo
---------------------------------------------------------------- */
.about-section { background: var(--white); }

.about-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 88px;
    align-items: start;
}

/* Photo column */
.about-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Portrait photo with gold ring */
.photo-wrapper {
    position: relative;
    width: 220px;
    margin-bottom: 28px;
}

.photo-frame {
    width: 220px;
    height: 330px;
    border-radius: 14px;         /* rounded rectangle matching photo shape */
    overflow: hidden;
    position: relative;
    z-index: 1;
    /* White inner border + gold outer ring */
    border: 5px solid var(--white);
    box-shadow:
        0 0 0 4px var(--gold),
        0 0 0 7px rgba(253, 217, 96, 0.15),
        var(--shadow-lg);
}

.headshot {
    /* Fill the portrait frame completely with no gaps */
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: none;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0eeec;  /* neutral warm-white matches photo sky bg */
    border-radius: 14px;
    z-index: 0;
}

.photo-placeholder span {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 700;
    color: var(--navy);
    opacity: 0.18;
    letter-spacing: -2px;
}

/* Decorative ring behind photo */
.photo-ring {
    position: absolute;
    inset: -12px;
    border-radius: 22px;
    border: 1px dashed rgba(253, 217, 96, 0.25);
    animation: rotateSlow 30s linear infinite;
    pointer-events: none;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}

/* Info chips below photo */
.info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    font-size: 12.5px;
    color: var(--gray-600);
    font-weight: 500;
    white-space: nowrap;
}

.info-chip i { color: var(--navy); font-size: 11.5px; }

/* Bio column */
.about-bio-col { padding-top: 4px; }

.about-bio-col p {
    font-size: 16.5px;
    color: var(--gray-600);
    line-height: 1.85;
    margin-bottom: 20px;
}

/* Stats */
.about-stats {
    display: flex;
    gap: 44px;
    margin-top: 44px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

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

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.stat-label {
    font-size: 12.5px;
    color: var(--gray-400);
    font-weight: 500;
}

/* ----------------------------------------------------------------
   8. SKILLS SECTION
---------------------------------------------------------------- */
.skills-section { background: var(--off-white); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

.skill-category {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--gold);  /* gold rule — campaign accent */
}

.category-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy-deeper, #011040), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);    /* gold icon — campaign style */
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 48, 135, 0.22);
}

.category-header h3 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--dark);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.skill-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dots */
.skill-dots {
    display: flex;
    gap: var(--dot-gap);
    flex-shrink: 0;
}

.skill-dots .dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: var(--gray-200);
    transform: scale(0);
    transition: transform 0.35s var(--ease-spring), background 0.35s var(--ease);
}

.skill-dots .dot.filled { background: var(--navy); }

.skill-dots.animated .dot { transform: scale(1); }

.skill-dots.animated .dot.filled {
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0, 48, 135, 0.30);
}

/* Stagger */
.skill-dots.animated .dot:nth-child(1) { transition-delay: 0ms;   }
.skill-dots.animated .dot:nth-child(2) { transition-delay: 70ms;  }
.skill-dots.animated .dot:nth-child(3) { transition-delay: 140ms; }
.skill-dots.animated .dot:nth-child(4) { transition-delay: 210ms; }
.skill-dots.animated .dot:nth-child(5) { transition-delay: 280ms; }

.skill-dots.static .dot { transform: scale(1); transition: none; }

/* Legend */
.skills-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 28px;
    background: var(--white);
    border-radius: 9999px;
    border: 1px solid var(--gray-200);
    width: fit-content;
    margin: 0 auto;
    gap: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--gray-600);
    padding: 0 24px;
}

.legend-dot-separator {
    width: 1px;
    height: 20px;
    background: var(--gray-200);
}

/* ----------------------------------------------------------------
   9. EXPERIENCE / TIMELINE
---------------------------------------------------------------- */
.experience-section { background: var(--white); }

.timeline { max-width: 780px; margin: 0 auto; }

.timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 28px;
    margin-bottom: 0;
}

.timeline-left {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 18px;
}

.timeline-year {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-dark);    /* gold year labels */
    text-align: right;
    line-height: 1.3;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.node-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);   /* gold dot — campaign accent */
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gold);
    flex-shrink: 0;
    z-index: 1;
}

.node-line {
    width: 2px;
    flex: 1;
    min-height: 40px;
    background: linear-gradient(to bottom, var(--gold), var(--gray-200));
    margin-top: 8px;
}

.timeline-card { padding-bottom: 52px; }
.timeline-item:last-child .timeline-card { padding-bottom: 0; }

.timeline-card-inner {
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 28px 30px;
    position: relative;
    transition: box-shadow 0.3s var(--ease);
}

.timeline-card-inner:hover { box-shadow: var(--shadow-md); }

/* Pointer triangle */
.timeline-card-inner::before {
    content: '';
    position: absolute;
    top: 22px;
    left: -9px;
    width: 16px;
    height: 16px;
    background: var(--off-white);
    border-left: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    transform: rotate(45deg);
    border-radius: 0 0 0 3px;
}

.timeline-role {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 7px;
}

.timeline-org {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 16px;
}

.timeline-org i { color: var(--navy); font-size: 12px; }

.timeline-desc {
    font-size: 14.5px;
    color: var(--gray-600);
    line-height: 1.75;
    margin-bottom: 18px;
}

.timeline-tags { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--navy-subtle);
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

/* ----------------------------------------------------------------
   10. PORTFOLIO / LINKS
---------------------------------------------------------------- */
.portfolio-section { background: var(--navy-deep); }  /* dark campaign bg */

/* Override section-header text on dark bg */
.portfolio-section .section-label {
    color: var(--gold);
}

.portfolio-section .section-title {
    color: var(--text-hero);
}

.portfolio-section .section-subtitle {
    color: var(--navy-light);
    opacity: 0.75;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 36px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-direction: column;
    gap: 22px;
    transition: all 0.3s var(--ease);
    overflow: hidden;
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(253, 217, 96, 0.30);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.portfolio-card-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.linkedin-accent { background: linear-gradient(90deg, #0A66C2, #0082CA); }
.tableau-accent  { background: linear-gradient(90deg, var(--navy), #0A66C2); }
.github-accent   { background: linear-gradient(90deg, #4f5d73, #8b949e); }

.portfolio-icon {
    width: 62px;
    height: 62px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    color: var(--white);
}

.linkedin-icon { background: #0A66C2; }
.tableau-icon  { background: linear-gradient(135deg, var(--navy-deep), #0082CA); }
.github-icon   { background: linear-gradient(135deg, #24292e, #4f5d73); }

.portfolio-card-body h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.portfolio-card-body p {
    font-size: 14.5px;
    color: rgba(226, 230, 237, 0.65);
    line-height: 1.75;
    margin-bottom: 20px;
}

.portfolio-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gold);
    transition: gap 0.2s var(--ease);
}

.portfolio-card:hover .portfolio-cta { gap: 14px; }

/* ----------------------------------------------------------------
   11. FOOTER
---------------------------------------------------------------- */
.footer {
    background: var(--navy-darker);
    color: var(--white);
    padding: 52px 0 28px;
}

.footer-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand { display: flex; align-items: center; gap: 16px; }

.footer-initials {
    width: 48px;
    height: 48px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Easter egg: glows on repeated clicks */
    transition: all 0.3s var(--ease);
    cursor: default;
}

.footer-initials.egg-click {
    box-shadow: 0 0 0 4px rgba(253, 217, 96, 0.5);
    border-color: var(--gold);
    background: rgba(253, 217, 96, 0.12);
}

.footer-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.footer-subtitle {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.38);
    margin-top: 3px;
}

.footer-socials { display: flex; gap: 12px; }

.footer-socials a {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.60);
    transition: all 0.25s var(--ease);
}

.footer-socials a:hover {
    background: rgba(253, 217, 96, 0.12);
    border-color: rgba(253, 217, 96, 0.35);
    color: var(--gold);
    transform: translateY(-2px);
}

.footer-bar {
    text-align: center;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Easter egg hint — barely visible in footer */
.footer-egg-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.06);
    cursor: default;
    letter-spacing: 1px;
    transition: color 0.3s var(--ease);
    user-select: none;
}

.footer-egg-hint:hover { color: rgba(253,217,96,0.15); }

/* ----------------------------------------------------------------
   12. ANIMATIONS
---------------------------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeUp 0.7s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.30s; }
.delay-3 { animation-delay: 0.48s; }
.delay-4 { animation-delay: 0.65s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

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

.reveal.delay-reveal { transition-delay: 0.15s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ----------------------------------------------------------------
   13. REVERSI EASTER EGG GAME
   Duke Blue (#003087) vs UNC Carolina Blue (#4B9CD3)
---------------------------------------------------------------- */
.reversi-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}

.reversi-modal.open {
    opacity: 1;
    pointer-events: all;
}

.reversi-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 16, 64, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reversi-dialog {
    position: relative;
    z-index: 1;
    background: #0D1E3A;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 28px;
    width: min(540px, 96vw);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
    animation: dialogPop 0.35s var(--ease-spring);
}

@keyframes dialogPop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ================================================================
   BASKETBALL SCOREBOARD  — Battle of the Blues
================================================================ */
.scoreboard {
    background: #07101e;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.5);
}

/* Header bar — LED amber strip */
.sb-header {
    background: linear-gradient(180deg, #0e1a2e 0%, #07101e 100%);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 3.5px;
    color: var(--gold);
    text-transform: uppercase;
}

.sb-bolt {
    font-size: 11px;
    opacity: 0.7;
    animation: boltPulse 2.5s ease-in-out infinite;
}

@keyframes boltPulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 0.25; }
}

/* Main body — two team panels + center column */
.sb-body {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    align-items: center;
    padding: 18px 12px 14px;
    gap: 0;
}

/* Team panel shared */
.sb-team-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* School shield logos */
.school-logo {
    width: 54px;
    height: 63px;
    margin-bottom: 2px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
    transition: transform 0.3s var(--ease);
}

.school-logo:hover { transform: scale(1.06); }

/* Team labels */
.sb-name {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.45);
    margin-top: 1px;
}

.sb-nickname {
    font-size: 9.5px;
    color: rgba(255,255,255,0.22);
    letter-spacing: 0.5px;
    font-style: italic;
}

/* LED scores */
.sb-score {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 54px;
    font-weight: 900;
    line-height: 1;
    min-width: 66px;
    text-align: center;
    margin-top: 4px;
    transition: transform 0.12s var(--ease-spring);
}

.sb-score.score-pop { animation: scorePop 0.35s var(--ease-spring); }

@keyframes scorePop {
    0%   { transform: scale(1);    }
    40%  { transform: scale(1.18); }
    100% { transform: scale(1);    }
}

.duke-score {
    color: #6aabdf;
    text-shadow:
        0 0 12px rgba(106,171,223,0.7),
        0 0 32px rgba(106,171,223,0.3);
}

.unc-score {
    color: #7ed3f0;
    text-shadow:
        0 0 12px rgba(126,211,240,0.7),
        0 0 32px rgba(126,211,240,0.3);
}

.sb-you-tag {
    font-size: 9px;
    color: rgba(255,255,255,0.20);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Center separator column */
.sb-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

.sb-vline {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.10), transparent);
}

.sb-vs-label {
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.15);
    text-align: center;
}

/* Status ticker row */
.sb-status-row {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 7px 16px;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sb-status-txt {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.42);
    text-align: center;
    text-transform: uppercase;
}

.sb-ticker-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.duke-dot { background: #6aabdf; box-shadow: 0 0 6px rgba(106,171,223,0.7); }
.unc-dot  { background: #7ed3f0; box-shadow: 0 0 6px rgba(126,211,240,0.7); }

/* Active ticker state */
.sb-status-row.unc-turn .sb-ticker-dot  { background: #7ed3f0; box-shadow: 0 0 6px rgba(126,211,240,0.7); }
.sb-status-row.duke-turn .sb-ticker-dot { background: #6aabdf; box-shadow: 0 0 6px rgba(106,171,223,0.7); }

/* Board */
.reversi-board-wrap {
    padding: 10px;
    background: #1a3d2e;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.reversi-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    aspect-ratio: 1;
}

.r-cell {
    border-radius: 5px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: background 0.15s ease;
    position: relative;
}

.r-cell.r-light { background: #2a7a4e; }
.r-cell.r-dark  { background: #236340; }

.r-cell.r-valid { cursor: pointer; }

.r-cell.r-valid:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

/* Pieces */
.r-piece {
    width: 78%;
    height: 78%;
    border-radius: 50%;
    transition: transform 0.25s var(--ease-spring);
    box-shadow: 0 3px 10px rgba(0,0,0,0.50);
}

.r-piece.r-duke {
    background: radial-gradient(circle at 38% 35%, #4a88cc 0%, #003087 60%, #00205e 100%);
    border: 2px solid rgba(91, 155, 213, 0.45);
}

.r-piece.r-unc {
    background: radial-gradient(circle at 38% 35%, #82c5e8 0%, #4B9CD3 60%, #2d7fb8 100%);
    border: 2px solid rgba(130, 197, 232, 0.45);
}

/* ---- Two-phase 3-D flip: rotates 90° away, swaps colour, rotates back ---- */

/* Phase 1 — piece rotates edge-on (added via JS) */
.r-piece.flip-out {
    animation: pieceFlipOut 0.25s ease-in forwards;
    transform-origin: center center;
}

/* Phase 2 — piece rotates back in new colour (added via JS) */
.r-piece.flip-in {
    animation: pieceFlipIn 0.25s ease-out forwards;
    transform-origin: center center;
}

@keyframes pieceFlipOut {
    0%   { transform: perspective(280px) rotateY(0deg)   scale(1);    }
    100% { transform: perspective(280px) rotateY(90deg)  scale(0.8);  }
}

@keyframes pieceFlipIn {
    0%   { transform: perspective(280px) rotateY(-90deg) scale(0.8);  }
    100% { transform: perspective(280px) rotateY(0deg)   scale(1);    }
}

.r-piece.place-pop {
    animation: placePop 0.25s var(--ease-spring);
}

@keyframes placePop {
    from { transform: scale(0);  }
    to   { transform: scale(1);  }
}

/* Valid move hint dot */
.r-hint {
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.42);
    pointer-events: none;
}

/* Corner dots on board */
.r-corner-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
}

/* Game buttons */
.reversi-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.reversi-btn {
    padding: 10px 26px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.22s var(--ease);
    background: var(--gold);
    color: var(--navy-deep);
    letter-spacing: 0.2px;
}

.reversi-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.reversi-btn-ghost {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.reversi-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    box-shadow: none;
    color: var(--white);
}

/* Win/lose banner */
.reversi-result {
    text-align: center;
    border-radius: 12px;
    margin-bottom: 14px;
    display: none;
    overflow: hidden;
}

.reversi-result.show       { display: flex; justify-content: center; }
.reversi-result.duke-wins  { background: rgba(0,30,107,0.5);   border: 1px solid rgba(100,160,230,0.25); }
.reversi-result.unc-wins   { background: rgba(75,156,211,0.18); border: 1px solid rgba(75,156,211,0.35); }
.reversi-result.tie-game   { background: rgba(253,217,96,0.12); border: 1px solid rgba(253,217,96,0.25);
                              color: var(--gold); font-family: 'Orbitron', monospace;
                              font-size: 15px; font-weight: 700; padding: 16px 24px; }

/* Win celebration banner (shown inside .reversi-result) */
.win-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 24px;
    animation: dialogPop 0.45s var(--ease-spring) both;
}

.win-shield svg { display: block; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.55)); }

.win-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.win-label {
    font-family: 'Orbitron', monospace;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--white);
}

.reversi-result.duke-wins .win-label { text-shadow: 0 0 20px rgba(100,170,240,0.6); }
.reversi-result.unc-wins  .win-label { text-shadow: 0 0 20px rgba(75,156,211,0.7);  }

.win-score {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
}

/* Instructions screen */
.instructions-screen {
    padding: 4px 0 8px;
    animation: tsScreenIn 0.3s var(--ease-spring) both;
}

.instructions-screen[hidden] { display: none !important; }

.inst-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin: 0 0 16px;
}

.inst-rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.inst-rule {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.07);
}

.inst-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.inst-rule strong { color: var(--white); }

/* How to Play + Close button row on team select */
.ts-footer-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.ts-how-btn {
    font-size: 12px;
    padding: 8px 18px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
.ts-how-btn:hover { opacity: 1; }

/* ----------------------------------------------------------------
   13b. TEAM SELECTION SCREEN
---------------------------------------------------------------- */

/* Screen wrapper */
.team-select-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 4px;
    animation: dialogPop 0.35s var(--ease-spring) both;
}

/* Headline */
.ts-headline {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.ts-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

/* Row of two choices + VS */
.ts-choices {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

/* VS divider */
.ts-vs {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 900;
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
    letter-spacing: 0.08em;
}

/* Individual choice button */
.ts-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 22px 24px 18px;
    cursor: pointer;
    transition: transform 0.22s var(--ease-spring),
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.25s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.ts-choice::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Duke hover */
.ts-choice-duke:hover,
.ts-choice-duke:focus-visible {
    background: rgba(0,48,135,0.25);
    border-color: rgba(253,217,96,0.5);
    box-shadow: 0 0 28px rgba(0,48,135,0.6), 0 0 8px rgba(253,217,96,0.25) inset;
    transform: translateY(-4px) scale(1.02);
    outline: none;
}

.ts-choice-duke:active { transform: translateY(-1px) scale(0.99); }

/* UNC hover */
.ts-choice-unc:hover,
.ts-choice-unc:focus-visible {
    background: rgba(75,156,211,0.18);
    border-color: rgba(75,156,211,0.6);
    box-shadow: 0 0 28px rgba(75,156,211,0.45), 0 0 8px rgba(75,156,211,0.15) inset;
    transform: translateY(-4px) scale(1.02);
    outline: none;
}

.ts-choice-unc:active { transform: translateY(-1px) scale(0.99); }

/* Shield inside choice button */
.ts-shield-wrap {
    width: 72px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    transition: filter 0.25s ease, transform 0.25s ease;
}

.ts-choice:hover .ts-shield-wrap {
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.6));
    transform: scale(1.06);
}

.ts-shield { width: 72px; height: 84px; }

/* School name + nickname labels */
.ts-school-name {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--white);
}

.ts-choice-duke .ts-school-name { color: #a8c8f8; }
.ts-choice-unc  .ts-school-name { color: #7ed3f0; }

.ts-school-nick {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
}

/* Mini piece preview dot */
.ts-piece-preview {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-top: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}
.ts-choice:hover .ts-piece-preview { transform: scale(1.15); }

.ts-piece-duke {
    background: radial-gradient(circle at 38% 35%, #4a88cc 0%, #003087 60%, #00205e 100%);
    border: 1.5px solid rgba(253,217,96,0.4);
}
.ts-piece-unc {
    background: radial-gradient(circle at 38% 35%, #82c5e8 0%, #4B9CD3 60%, #2d7fb8 100%);
    border: 1.5px solid rgba(255,255,255,0.35);
}

/* Close button on selection screen */
.ts-close-btn {
    font-size: 12px;
    padding: 8px 22px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.ts-close-btn:hover { opacity: 1; }

/* Game container — plain block so children inherit full dialog width */
.game-container {
    width: 100%;
}

/* !important is required here: the display:flex rules above override the
   browser's default display:none for the [hidden] attribute otherwise */
.game-container[hidden]     { display: none !important; }
.team-select-screen[hidden] { display: none !important; }

@keyframes tsScreenIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.team-select-screen { animation: tsScreenIn 0.32s var(--ease-spring) both; }
.game-container     { animation: tsScreenIn 0.32s var(--ease-spring) both; }

/* ----------------------------------------------------------------
   14. RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 1060px) {
    .about-grid { grid-template-columns: 300px 1fr; gap: 60px; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
    .skill-category:nth-child(3) { grid-column: 1 / -1; max-width: 500px; margin: 0 auto; width: 100%; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); max-width: 680px; }
    .portfolio-grid .portfolio-card:nth-child(3) { grid-column: 1 / -1; max-width: 320px; margin: 0 auto; width: 100%; }
}

@media (max-width: 768px) {
    :root { --section-py: 72px; }

    .nav-container { padding: 0 20px; }
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: min(300px, 85vw);
        background: var(--navy-deep);
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 40px 32px;
        transition: right 0.35s var(--ease);
        box-shadow: -8px 0 40px rgba(0,0,0,0.35);
        border-left: 1px solid rgba(255,255,255,0.07);
    }

    .nav-links.open { right: 0; }

    .nav-links a {
        font-size: 18px !important;
        padding: 12px 16px !important;
        color: var(--white) !important;
        background: transparent !important;
    }

    .nav-links a:hover { background: rgba(255,255,255,0.08) !important; }

    .nav-links .nav-cta {
        margin-top: 12px;
        background: var(--gold) !important;
        color: var(--navy-deep) !important;
        border: none !important;
        text-align: center;
        justify-content: center;
    }

    .about-grid { grid-template-columns: 1fr; gap: 56px; }
    .photo-frame { width: 240px; height: 240px; }
    .photo-wrapper { width: 240px; }
    .about-stats { flex-wrap: wrap; gap: 28px; }

    .skills-grid { grid-template-columns: 1fr; }
    .skill-category:nth-child(3) { grid-column: 1; max-width: none; }

    .skills-legend { border-radius: var(--radius); flex-direction: column; align-items: flex-start; gap: 14px; }
    .legend-item { padding: 0; }
    .legend-dot-separator { display: none; }

    .timeline-item { grid-template-columns: 70px 1fr; gap: 16px; }
    .timeline-year { font-size: 10px; }

    .portfolio-grid { grid-template-columns: 1fr; max-width: 480px; }

    .footer-body { flex-direction: column; gap: 24px; text-align: center; }
    .footer-brand { flex-direction: column; }

    .container { padding: 0 20px; }
}

@media (max-width: 480px) {
    .hero-ctas { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; max-width: 300px; }

    .timeline-item { grid-template-columns: 1fr; }
    .timeline-left { flex-direction: row; align-items: center; justify-content: flex-start; padding-top: 0; gap: 14px; }
    .timeline-node { flex-direction: row; align-items: center; gap: 10px; flex: none; }
    .node-line { min-height: 0; width: 40px; height: 2px; background: linear-gradient(to right, var(--gold), var(--gray-200)); margin-top: 0; }
    .timeline-card-inner::before { display: none; }

    .reversi-dialog { padding: 20px; }
    .r-score-num { font-size: 24px; }
}

/* ================================================================
   15. CONTACT MODAL
================================================================ */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.contact-modal.open {
    opacity: 1;
    visibility: visible;
}
.contact-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 16, 64, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.contact-dialog {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 44px 40px 40px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 48, 135, 0.28);
    transform: translateY(22px) scale(0.97);
    transition: transform 0.32s var(--ease-spring);
}
.contact-modal.open .contact-dialog {
    transform: translateY(0) scale(1);
}
.contact-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    background: var(--gray-50);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gray-600);
    transition: background 0.2s, color 0.2s;
}
.contact-close:hover { background: var(--gray-200); color: var(--text); }

.contact-header { text-align: center; margin-bottom: 28px; }
.contact-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--gold);
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(0, 48, 135, 0.22);
}
.contact-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 6px;
}
.contact-subtitle { font-size: 14px; color: var(--gray-600); }

.contact-field { margin-bottom: 18px; }
.contact-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--off-white);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus {
    border-color: var(--navy-mid);
    box-shadow: 0 0 0 3px rgba(5, 71, 160, 0.12);
    background: var(--white);
}
.contact-field input.field-error,
.contact-field textarea.field-error { border-color: #e53e3e; }

.contact-error {
    font-size: 13px;
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.contact-send-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 14px 24px;
    margin-top: 4px;
}
.contact-send-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Success state */
.contact-success {
    text-align: center;
    padding: 16px 0 8px;
}
.contact-success-icon {
    font-size: 52px;
    color: #38a169;
    margin-bottom: 14px;
}
.contact-success h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: var(--navy);
    margin-bottom: 8px;
}
.contact-success p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.7;
}
.contact-done-btn { min-width: 120px; justify-content: center; }

/* Contact CTA row in portfolio section */
.portfolio-contact-row {
    text-align: center;
    margin-top: 44px;
}
.portfolio-contact-row .btn {
    font-size: 15px;
    padding: 14px 32px;
}

@media (max-width: 520px) {
    .contact-dialog { padding: 36px 22px 28px; }
}

/* ================================================================
   16. KONAMI CODE EASTER EGG
================================================================ */
.konami-overlay {
    position: fixed;
    inset: 0;
    background: rgba(1, 14, 52, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}
.konami-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.konami-overlay.fade-out {
    opacity: 0;
    transition: opacity 1.2s ease;
    pointer-events: none;
}

.konami-ghost-layer,
.konami-color-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.konami-logo {
    max-width: min(580px, 82vw);
    max-height: 62vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Ghost — deep navy-blue silhouette, barely visible before scan */
.konami-ghost {
    filter: brightness(0.12) contrast(2) sepia(1) hue-rotate(185deg) saturate(8);
    opacity: 0;
    transition: opacity 1s ease;
}
.konami-overlay.active .konami-ghost { opacity: 0.75; }

/* Full-colour version revealed by clip-path */
.konami-color-layer { clip-path: inset(0 0 100% 0); }

/* Green CRT scan line */
.konami-scanline {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: #00ff41;
    box-shadow:
        0 0 8px  3px #00ff41,
        0 0 22px 6px rgba(0, 255, 65, 0.55),
        0 0 60px 14px rgba(0, 255, 65, 0.18);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.25s ease;
}
.konami-overlay.scanning .konami-scanline { opacity: 1; }

/* Skip button */
.konami-skip {
    position: absolute;
    bottom: 28px;
    right: 28px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s ease 1.8s, background 0.2s, color 0.2s;
}
.konami-overlay.active .konami-skip { opacity: 1; }
.konami-skip:hover {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
}
