/* =====================================================
   Fabio Gloor – Portfolio Platform
   Design System: "Editorial Luxe"
   Dual Theme (Dark / Light) with Liquid Glass
   ===================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties – Dual Theme ── */
:root,
[data-theme="dark"] {
    /* Backgrounds */
    --bg-primary: #080808;
    --bg-secondary: #101010;
    --bg-tertiary: #181818;
    --bg-card: rgba(255,255,255,0.025);
    --bg-card-hover: rgba(255,255,255,0.05);

    /* Text */
    --text-primary: #f0ece4;
    --text-secondary: #8a8578;
    --text-tertiary: #5a564e;
    --text-inverse: #080808;

    /* Accent – Warm Gold */
    --accent: #c9a96e;
    --accent-light: #e8d5b0;
    --accent-dark: #8b6914;
    --accent-gradient: linear-gradient(135deg, #c9a96e 0%, #e8d5b0 50%, #c9a96e 100%);
    --accent-gradient-diagonal: linear-gradient(45deg, #8b6914, #c9a96e, #e8d5b0, #c9a96e);

    /* Liquid Glass */
    --glass-bg: rgba(255,255,255,0.035);
    --glass-bg-hover: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.07);
    --glass-border-hover: rgba(201,169,110,0.25);
    --glass-blur: blur(24px) saturate(180%);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);

    /* Misc */
    --grain-opacity: 0.035;
    --overlay-bg: rgba(8,8,8,0.85);
    --divider: rgba(255,255,255,0.06);
    --scrollbar-thumb: rgba(201,169,110,0.3);
    --scrollbar-track: transparent;
    --focus-ring: rgba(201,169,110,0.5);
    --input-bg: rgba(255,255,255,0.05);
    --input-border: rgba(255,255,255,0.1);
}

[data-theme="light"] {
    --bg-primary: #faf8f5;
    --bg-secondary: #f0ece6;
    --bg-tertiary: #e8e3da;
    --bg-card: rgba(0,0,0,0.015);
    --bg-card-hover: rgba(0,0,0,0.03);

    --text-primary: #1a1a18;
    --text-secondary: #6b655a;
    --text-tertiary: #9a948a;
    --text-inverse: #f0ece4;

    --accent: #8b6914;
    --accent-light: #c9a96e;
    --accent-dark: #5a4410;
    --accent-gradient: linear-gradient(135deg, #8b6914 0%, #c9a96e 50%, #8b6914 100%);
    --accent-gradient-diagonal: linear-gradient(45deg, #5a4410, #8b6914, #c9a96e, #8b6914);

    --glass-bg: rgba(255,255,255,0.65);
    --glass-bg-hover: rgba(255,255,255,0.8);
    --glass-border: rgba(0,0,0,0.06);
    --glass-border-hover: rgba(139,105,20,0.25);
    --glass-blur: blur(24px) saturate(120%);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);

    --grain-opacity: 0.015;
    --overlay-bg: rgba(250,248,245,0.9);
    --divider: rgba(0,0,0,0.06);
    --scrollbar-thumb: rgba(139,105,20,0.3);
    --scrollbar-track: transparent;
    --focus-ring: rgba(139,105,20,0.4);
    --input-bg: rgba(0,0,0,0.03);
    --input-border: rgba(0,0,0,0.1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

/* ── Film Grain Overlay ── */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }

.display-xl {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: var(--accent-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-small { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

.subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ── Layout ── */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
}

.section {
    padding: clamp(4rem, 10vw, 10rem) 0;
    position: relative;
}

.section-header {
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

/* ── Liquid Glass Card ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    contain: layout;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow), 0 16px 48px rgba(201,169,110,0.08);
}

/* ── Theme Toggle ── */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--accent);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: opacity 0.3s, transform 0.3s; position: absolute; }

[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg); }

/* ── Landing / Hero ── */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,169,110,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201,169,110,0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(201,169,110,0.03) 0%, transparent 50%);
}

.landing-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.logo-container {
    width: clamp(220px, 30vw, 340px);
    margin: 0 auto 3rem;
}

.logo-container svg {
    width: 100%;
    height: auto;
}

/* SVG draw animation */
.logo-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLogo 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.logo-path-fill {
    fill: var(--text-primary);
    opacity: 0;
    animation: fadeIn 1s ease forwards 2s;
}

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

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

.landing-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 1.5s;
}

.landing-motto {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 2.4s;
}

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

/* ── Token Gate ── */
.gate-form {
    opacity: 0;
    animation: slideUp 0.8s ease forwards 2.2s;
    max-width: 360px;
    margin: 0 auto;
}

.gate-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gate-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 60px;
    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gate-input::placeholder {
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

.gate-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.gate-submit {
    position: absolute;
    right: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #080808;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.3s ease;
}

.gate-submit:hover {
    transform: scale(1.1);
    background: var(--accent-light);
}

.gate-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    min-height: 1.2rem;
}

/* ── Main Navigation (authenticated) ── */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    width: 40px;
    height: 40px;
}

.nav-logo svg {
    width: 100%;
    height: 100%;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

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

/* ── Timeline Section (Horizontal Scroll) ── */
.timeline-section {
    overflow: hidden;
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.timeline-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.timeline-track {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.timeline-card {
    flex: 0 0 380px;
    padding: 2rem;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.timeline-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-6px);
}

.timeline-date {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.timeline-company {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-position {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.timeline-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--divider);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* Timeline connector line */
.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--divider);
    z-index: -1;
}

/* ── Portfolio Grid ── */
.portfolio-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    perspective: 1000px;
}

.portfolio-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.portfolio-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
    background: var(--bg-tertiary);
}

.portfolio-card:hover .portfolio-card-image {
    transform: scale(1.05);
}

.portfolio-card-body {
    padding: 1.25rem;
}

.portfolio-card-category {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.portfolio-card-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.portfolio-card-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.75rem;
}

/* ── Skills Section ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category-title {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-item {
    margin-bottom: 0.75rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.skill-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-level {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.skill-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent-gradient);
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: var(--overlay-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active .lightbox-content {
    transform: translateY(0) scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── AI Matcher Section ── */
.ai-section {
    background: var(--bg-secondary);
}

.ai-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1.5rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.ai-textarea:focus {
    border-color: var(--accent);
}

.ai-result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.match-score-ring {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 1rem;
}

.match-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.match-score-ring circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}

.match-score-ring .bg { stroke: var(--bg-tertiary); }
.match-score-ring .fill {
    stroke: var(--accent);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease;
}

.match-score-value {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 60px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #080808;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,169,110,0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    border-color: var(--accent);
    background: var(--glass-bg-hover);
}

/* ── Loading Spinner ── */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

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

    .timeline-card {
        flex: 0 0 300px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.7rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .landing-name {
        letter-spacing: 0.08em;
    }

    .gate-input {
        padding: 0.8rem 3rem 0.8rem 1.2rem;
    }

    .portfolio-grid {
        gap: 1rem;
    }
}

/* ── Placeholder image ── */
.placeholder-img {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Education Section ── */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.education-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.education-type {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.education-institution {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.education-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ── Footer ── */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--divider);
    text-align: center;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

/* ── Utility: Hidden until animated ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ── 3D Hover Effect ── */
.card-3d {
    perspective: 800px;
}

.card-3d-inner {
    transition: transform 0.4s ease;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(3deg) rotateX(-2deg);
}

/* ── Floating Decorative Elements ── */
.float-element {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,169,110,0.08), transparent);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
