/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    /* Premium easing curves */
    --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-back:  cubic-bezier(0.34, 1.4, 0.64, 1);

    /* Theme A: Architecture (Warm Terracotta/Brown) */
    --arch-bg: #EAE6DF;
    /* Lighter background suitable for reading on mobile */
    --arch-surface: #F5F2EB;
    --arch-text: #2B1209;
    --arch-accent: #a08070;
    --arch-border: rgba(43, 18, 9, 0.15);

    /* Theme B: Interior (Sage/Off-White) */
    --int-bg: #e3e3d6;
    --int-surface: #e0e0d0;
    --int-text: #000000;
    --int-accent: #101010;
    --int-border: rgba(0, 0, 0, 0.15);

    /* Current Theme Variables (Default to Arch) */
    --bg-color: var(--arch-bg);
    --surface-color: var(--arch-surface);
    --text-color: var(--arch-text);
    --accent-color: var(--arch-accent);
    --border-color: var(--arch-border);

    /* Typography */
    /* Sans for Arch, Serif for Interior */
    --font-heading-arch: 'HeroLight', 'Quicksand', sans-serif;
    --font-body-arch: 'Quicksand', sans-serif;

    --font-heading-int: 'Belleza', serif;
    --font-body-int: 'Belleza', serif;

    --font-heading: var(--font-heading-arch);
    --font-body: var(--font-body-arch);

    --transition-theme: background-color 1.5s ease-in-out, color 1.5s ease-in-out;
}

/* Interior Theme Override Class */
body.theme-interior {
    --bg-color: var(--int-bg);
    --surface-color: var(--int-surface);
    --text-color: var(--int-text);
    --accent-color: var(--int-accent);
    --border-color: var(--int-border);
    --font-heading: var(--font-heading-int);
    --font-body: var(--font-body-int);
}

/* ==========================================================================
   Back Link — normalized for ALL detail pages (arch + interior, mobile + desktop)
   ========================================================================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);

    /* Underline accent */
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;

    /* Layout */
    margin-bottom: 30px;
    cursor: pointer;
    transition: opacity 0.2s, gap 0.2s;
    /* Slight gap open on hover feels nice */
}

.back-link:hover {
    opacity: 0.6;
    gap: 16px;
}

/* On interior (dark-text) pages the color inherits; on arch pages too */
body.theme-interior .back-link {
    color: #000;
    border-color: #000;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Architecture precision feel: crosshair everywhere except interactive elements */
body {
    cursor: crosshair;
}

a,
button,
[role="button"],
label[for],
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
.btn,
.back-link,
.nav-back-link,
.detail-card,
.project-card,
.gallery-item,
.int-gallery-item,
.skill-item,
.menu-btn,
.horizontal-scroller > * {
    cursor: pointer;
}

/* Children inherit pointer from their interactive parent */
a *,
button *,
[role="button"] *,
.btn *,
.back-link *,
.nav-back-link *,
.detail-card *,
.project-card *,
.gallery-item *,
.int-gallery-item *,
.skill-item *,
.menu-btn *,
.horizontal-scroller > * * {
    cursor: inherit;
}


html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Offset fixed navbar so anchors (#about, #experience etc.) land correctly */
    scroll-padding-top: 70px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: opacity 0.25s ease, var(--transition-theme);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Page exit fade — added by JS before navigation */
body.page-exit {
    opacity: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.2;
    transition: var(--transition-theme);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

.section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   Blueprint Grid Background
   ========================================================================== */
.blueprint-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    /* Subtle breathing animation for the grid */
    animation: gridBreathe 20s infinite alternate linear;
}

@keyframes gridBreathe {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.05);
        opacity: 0.15;
    }
}

/* ==========================================================================
   Loader (Drafting Effect)
   ========================================================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--arch-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.blueprint-line {
    width: 100px;
    height: 100px;
    stroke: var(--arch-text);
    stroke-width: 2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draftLine 2s ease-in-out forwards;
}

.loader-text {
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    /* Monospace for drafting feel */
    font-size: 0.8rem;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInOut 1.5s infinite alternate;
}

@keyframes draftLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInOut {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s, padding 0.3s;
    border-bottom: 1px solid transparent;
}

/* Back button that lives in the navbar on detail pages */
.nav-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);
    opacity: 0.75;
    transition: opacity 0.2s, gap 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-back-link:hover {
    opacity: 1;
    gap: 14px;
}

/* On mobile keep it compact */
@media (max-width: 767px) {
    .nav-back-link {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }
}

.navbar.scrolled {
    background: rgba(234, 230, 223, 0.95);
    /* matching --arch-bg */
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

body.theme-interior .navbar.scrolled {
    background: rgba(227, 227, 214, 0.95);
    /* matching --int-bg */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Mobile Menu Button */
.menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 20px;
    position: relative;
}

.menu-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: 0.3s ease-in-out;
}

.menu-line:nth-child(1) {
    top: 0;
}

.menu-line:nth-child(2) {
    top: 9px;
}

.menu-line:nth-child(3) {
    top: 18px;
}

/* Hamburger to X */
.menu-btn.open .menu-line:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.menu-btn.open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.open .menu-line:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* Nav Links overlay for Mobile */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
}

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

.nav-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a:active::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.greeting {
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.main-title {
    font-size: clamp(4rem, 15vw, 8rem);
    text-transform: capitalize;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* Glitch/Draft Effect for Title */
.glitched::before,
.glitched::after {
    content: 'Portfolio';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.glitched::before {
    left: 2px;
    text-shadow: -1px 0 var(--arch-accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
        transform: translate(0);
    }

    10% {
        clip: rect(50px, 9999px, 20px, 0);
        transform: translate(-2px, 1px);
    }

    20% {
        clip: rect(30px, 9999px, 100px, 0);
        transform: translate(2px, -1px);
    }

    30% {
        clip: rect(80px, 9999px, 40px, 0);
        transform: translate(0);
    }

    100% {
        clip: rect(80px, 9999px, 40px, 0);
        transform: translate(0);
    }
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.role {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    /* Blueprint label feel */
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    transition: left 0.3s;
    z-index: -1;
}

.btn:hover {
    color: var(--bg-color);
}

.btn:hover::before {
    left: 0;
}

/* SVG House Illustration */
.hero-illustration {
    margin-top: 40px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.anim-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

/* The JS will trigger '.drawn .anim-path' */
.hero.drawn .anim-path {
    animation: drawHouse 3s ease-out forwards;
}

.hero.drawn .p1 {
    animation-delay: 0.5s;
}

.hero.drawn .p2 {
    animation-delay: 1.0s;
}

.hero.drawn .p3 {
    animation-delay: 1.5s;
}

.hero.drawn .p4 {
    animation-delay: 2.0s;
}

.hero.drawn .p5 {
    animation-delay: 2.5s;
}

.hero.drawn .p6 {
    animation-delay: 3.0s;
}

@keyframes drawHouse {
    to {
        stroke-dashoffset: 0;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.section-header {
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 2.5rem;
    text-transform: capitalize;
}

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

/* Measurement scale line under headers */
.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-color);
    transition: width 1.1s var(--ease-expo);
}

.section-header.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-header.revealed::after {
    width: 80px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.about-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    padding-left: 20px; /* Prevent layout shift and image distress */
}

/* Ruler marking decoration next to photo */
.measuring-tape-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background-image: repeating-linear-gradient(to bottom,
            var(--text-color) 0,
            var(--text-color) 1px,
            transparent 1px,
            transparent 5px);
    z-index: 2;
    background-size: 100% 20px;
}

.measuring-tape-decor::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 100%;
    background-image: repeating-linear-gradient(to bottom,
            var(--text-color) 0,
            var(--text-color) 1px,
            transparent 1px,
            transparent 20px);
}

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

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    opacity: 0.9;
}

.education-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 4px;
    position: relative;
}

/* Blueprint crosshair corners */
.education-card::before,
.education-card::after {
    content: '+';
    position: absolute;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.5;
}

.education-card::before {
    top: 2px;
    left: 5px;
}

.education-card::after {
    bottom: 2px;
    right: 5px;
}

.education-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.education-card .year {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.timeline {
    position: relative;
    padding-left: 20px;
}

/* Vertical structural line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

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

/* Structural nodes */
.timeline-dot {
    position: absolute;
    top: 5px;
    left: -20px;
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--text-color);
    border-radius: 50%;
    transition: background 0.3s;
}

.timeline-item:hover .timeline-dot {
    background: var(--text-color);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.timeline-content h4 {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 600;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.skill-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.05);
    /* Architectural hard shadow */
}

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

.skill-name {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Projects (Architecture vs Interior)
   ========================================================================== */
.project-card {
    margin-bottom: 40px;
    transition: transform 0.5s var(--ease-expo);
}

.project-card:hover {
    transform: translateY(-6px);
}

.project-img-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 15px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--surface-color);
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    border: 1px solid var(--text-color);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.project-name,
.project-location {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   Horizontal Slider / Center Stage
   ========================================================================== */
.scroll-container-wrapper {
    /* Use negative margins to escape the container padding so cards go edge-to-edge */
    margin-left: -20px;
    margin-right: -20px;
    padding: 30px 0;
    /* Do NOT set overflow:hidden — that kills the horizontal scroll */
}

.horizontal-scroller {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    /* allow scale effect to show above */
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc(50% - 230px);
    /* snaps card to true centre */
    gap: 30px;
    padding-inline: calc(50% - 230px);
    /* first/last card can reach centre */
    padding-block: 40px;
    /* room for the scale pop */
    -ms-overflow-style: none;
    scrollbar-width: none;
    box-sizing: border-box;
}

.horizontal-scroller::-webkit-scrollbar {
    display: none;
}

/* Each card in the slider */
.horizontal-scroller>* {
    flex: 0 0 460px;
    width: 460px;
    scroll-snap-align: center;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s, filter 0.4s;
    opacity: 0.4;
    filter: grayscale(60%);
    transform: scale(0.86);
    pointer-events: auto;
    cursor: pointer;
}

/* Center stage: bright and scaled up */
.horizontal-scroller>*.center-stage {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.04);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Skills override — it's a grid by default, force flex */
.skills-grid.horizontal-scroller {
    display: flex;
    align-items: flex-start;
}

.skill-item {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.skill-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
    transition: all 0.4s ease;
    text-align: center;
}

.skill-item:hover .skill-detail,
.skill-item:focus .skill-detail,
.skill-item.expanded .skill-detail {
    max-height: 200px; /* arbitrary max height to allow expansion */
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.detail-card {
    text-align: center;
}

.detail-img {
    aspect-ratio: 1;
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    margin-bottom: 10px;
    position: relative;
}

.detail-img::after {
    /* Blueprint hatch pattern */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.05) 5px, rgba(0, 0, 0, 0.05) 6px);
}

.detail-card h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.detail-img-fixed {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.detail-card:hover .detail-img-fixed {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Theme Transition Zone Tracker */
.theme-transition-zone {
    height: 100px;
    /* scroll trigger area */
}

/* Interior Gallery (Masonry style look) */
.interior-subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.interior-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    display: block;
    /* For anchor tags */
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: filter 0.5s, transform 0.5s;
}

.gallery-item:hover .gallery-img {
    filter: brightness(1);
    transform: scale(1.03);
}

.gallery-item {
    transition: transform 0.5s var(--ease-expo);
}

.gallery-item:hover {
    transform: translateY(-6px);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    /* Always white text on interior photo captions */
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.4s var(--ease-expo), transform 0.4s var(--ease-expo);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

.gallery-caption h3 {
    font-family: 'Belleza', serif;
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #fff;
}

.gallery-caption p {
    font-family: 'Belleza', serif;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.contact-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   Contact Section — Two-column editorial layout
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
    padding: 20px 0;
}

.contact-tagline {
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.75;
    margin-bottom: 40px;
    max-width: 380px;
}

/* Info rows */
.contact-detail-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
}

.contact-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.2s;
}

a.contact-detail-row:hover {
    opacity: 0.6;
}

.contact-row-label {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    flex-shrink: 0;
    margin-right: 20px;
}

.contact-row-value {
    font-size: 0.95rem;
    text-align: right;
}

/* Pulsing green availability dot */
.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.avail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6abf69;
    flex-shrink: 0;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(106, 191, 105, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(106, 191, 105, 0);
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    transition: opacity 0.2s, border-color 0.2s;
}

.social-link:hover {
    opacity: 0.7;
    border-color: var(--text-color);
}

/* Form */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.55;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--text-color);
    box-shadow: 0 0 0 2px rgba(43, 18, 9, 0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    opacity: 0.4;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    transition: gap 0.2s, opacity 0.2s;
}

.contact-submit:hover {
    gap: 16px;
}

/* Success message */
.form-success {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #6abf69;
    min-height: 1.4em;
}

/* Mobile: stack columns */
@media (max-width: 767px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .contact-tagline {
        max-width: 100%;
    }
}

/* Mobile: horizontal scroller card sizing
   460px cards are wider than phones — shrink to 80vw so they fit
   and recalculate the centering offsets accordingly                */
@media (max-width: 767px) {
    .horizontal-scroller {
        scroll-padding-inline: 10vw;
        padding-inline: 10vw;
        gap: 20px;
    }

    .horizontal-scroller > * {
        flex: 0 0 80vw;
        width: 80vw;
    }
}

/* ==========================================================================
   Animations (Intersection Observer Classes)
   All reveal classes support --reveal-delay for per-element stagger.
   ========================================================================== */

/* Slide up + fade — used for most content blocks */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity   0.75s var(--ease-expo),
        transform 0.75s var(--ease-expo);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Pure opacity fade — used for gallery images */
.reveal-fade {
    opacity: 0;
    transition: opacity 1s var(--ease-quart);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-fade.revealed {
    opacity: 1;
}

/* Section header: text lifts up and underline draws — was missing, now fixed */
.reveal-line {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity   0.65s var(--ease-expo),
        transform 0.65s var(--ease-expo);
}

.reveal-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left — used for timeline items */
.reveal-slide-right {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity   0.65s var(--ease-expo),
        transform 0.65s var(--ease-expo);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-slide-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up from slightly small — used for image containers */
.reveal-scale {
    opacity: 0;
    transform: scale(0.93);
    transition:
        opacity   0.85s var(--ease-expo),
        transform 0.85s var(--ease-expo);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger: animate each direct child with a sequential delay */
.reveal-stagger.revealed > * {
    animation: slideUpFade 0.65s var(--ease-expo) forwards;
    opacity: 0;
}

.reveal-stagger.revealed > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { animation-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(3) { animation-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(4) { animation-delay: 0.35s; }
.reveal-stagger.revealed > *:nth-child(5) { animation-delay: 0.45s; }

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

/* Per-element stagger delays — project cards, gallery, timeline */
.project-list > .project-card:nth-child(2) { --reveal-delay: 0.1s; }
.project-list > .project-card:nth-child(3) { --reveal-delay: 0.2s; }

.interior-gallery > .gallery-item:nth-child(2) { --reveal-delay: 0.12s; }
.interior-gallery > .gallery-item:nth-child(3) { --reveal-delay: 0.24s; }
.interior-gallery > .gallery-item:nth-child(4) { --reveal-delay: 0.36s; }

.timeline > .timeline-item:nth-child(2) { --reveal-delay: 0.15s; }
.timeline > .timeline-item:nth-child(3) { --reveal-delay: 0.30s; }

/* Helpers */
.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s forwards;
    animation-delay: 1s;
}

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

/* Placeholder for images before real ones added */
.placeholder {
    background-color: #ddd;
}

/* ==========================================================================
   Desktop & Tablet Responsiveness (Media Queries)
   ========================================================================== */

/* Tablet and Small Desktop (768px and up) */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 90px;
    }

    .container {
        padding: 0 50px;
        max-width: 1200px;
    }

    .section {
        padding: 120px 0;
    }

    /* Hero */
    .hero-content {
        max-width: 600px;
        margin-top: 10vh;
    }

    .main-title {
        font-size: 6rem;
    }

    .hero-illustration {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        width: 50vw;
        max-width: 600px;
        margin-top: 0;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 60px;
        align-items: center;
    }

    .about-image-wrapper {
        margin-bottom: 0;
    }

    .section-header h2 {
        font-size: 3.5rem;
    }

    /* Projects Grid */
    .project-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    /* Interior Gallery - 5 Item Asymmetric Editorial Layout */
    .interior-gallery {
        grid-template-columns: repeat(12, 1fr);
        gap: 40px;
        align-items: start;
    }

    /* 1. Feature Banner */
    .interior-gallery .gallery-item:nth-child(1) {
        grid-column: 1 / -1;
    }
    .interior-gallery .gallery-item:nth-child(1) .gallery-img {
        height: 60vh;
        max-height: 550px;
    }

    /* 2. Large Left */
    .interior-gallery .gallery-item:nth-child(2) {
        grid-column: 1 / 8;
    }

    /* 3. Small Right Staggered Down */
    .interior-gallery .gallery-item:nth-child(3) {
        grid-column: 8 / 13;
        margin-top: 120px;
    }

    /* 4. Medium Left Offset */
    .interior-gallery .gallery-item:nth-child(4) {
        grid-column: 2 / 7;
    }

    /* 5. Medium Right Staggered Up */
    .interior-gallery .gallery-item:nth-child(5) {
        grid-column: 7 / 13;
        margin-top: -60px;
    }
}

/* Large Desktop (1024px and up) */
@media (min-width: 1024px) {

    /* Navbar - Switch from hamburger to full links */
    .menu-btn {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        height: auto;
        width: auto;
        background: transparent;
        padding: 0;
    }

    .nav-links a {
        font-size: 1rem;
        margin: 0 0 0 40px;
        letter-spacing: 2px;
    }

    .nav-links a::after {
        display: none;
        /* remove mobile underline */
    }

    /* Hover effect for desktop nav */
    .nav-links a {
        position: relative;
    }

    .nav-links a::before {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 1px;
        background-color: var(--text-color);
        transition: width 0.3s ease;
    }

    .nav-links a:hover::before {
        width: 100%;
    }

    /* Content Layouts */
    .skills-grid {
        display: flex;
        justify-content: space-between;
    }

    .project-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* The stylized vertical text seen in the Interior PDF */
    .gallery-item {
        overflow: visible;
        /* Need to see text outside box on desktop */
    }

    .gallery-item::before {
        content: 'Interior Rendering';
        position: absolute;
        left: -40px;
        top: 50%;
        transform: translateY(-50%) rotate(-90deg);
        font-family: 'Belleza', serif;
        font-size: 0.85rem;
        letter-spacing: 6px;
        color: var(--int-text);
        text-transform: uppercase;
        opacity: 0.6;
        white-space: nowrap;
        pointer-events: none;
    }

    .gallery-item:nth-child(even)::before {
        content: 'Material Study';
        right: -40px;
        left: auto;
        transform: translateY(-50%) rotate(90deg);
    }
}

/* ==========================================================================
   Mobile Structure Improvements (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {

    /* Tighter section padding — 80px feels like a lot on a phone screen */
    .section {
        padding: 55px 0;
    }

    /* Hero: shrink illustration so it doesn't eat the whole viewport */
    .hero-illustration {
        max-width: 280px;
        margin-top: 30px;
    }

    /* Main title: ensure it doesn't overflow on very narrow phones */
    .main-title {
        font-size: clamp(3rem, 18vw, 5rem);
        line-height: 1.05;
    }

    /* Hero subtitle / role — slightly smaller on phones */
    .hero-content .subtitle,
    .hero-content .role {
        font-size: 0.9rem;
    }

    /* About: limit the 3/4 portrait aspect-ratio height on mobile */
    .about-image-wrapper {
        aspect-ratio: 4/3;  /* landscape on mobile — less vertical space */
        max-height: 280px;
    }

    /* Section headings — 2.5rem base is fine; just nudge down slightly */
    .section-header h2 {
        font-size: 2rem;
    }

    /* Timeline: less left-indent, tighter gaps between entries */
    .timeline {
        padding-left: 16px;
    }

    .timeline-item {
        padding-bottom: 28px;
    }

    .timeline-dot {
        left: -16px;
    }

    .timeline-content h3 {
        font-size: 1.15rem;
    }

    /* Contact: reduce top padding so it doesn't feel disconnected */
    #contact.section {
        padding-top: 50px;
    }

}