/* ═══════════════════════════════════════════════
   DAWID CHOJNACKI — Personal Portfolio
   Design: Dark Navy / Silver / Luxury Tech
   Matches DC monogram logo palette
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Montserrat:wght@200;300;400;500;600&display=swap');

/* ── Root Design Tokens ────────────────────── */
:root {
    /* Dark navy palette — matching the DC logo */
    --bg-primary: #080c14;
    --bg-secondary: #0d1220;
    --bg-card: #111827;
    --bg-elevated: #162033;

    /* Silver / cool whites */
    --text-primary: #e8ecf4;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Silver accent — matching logo metallic */
    --accent: #c0c8d4;
    --accent-bright: #dde3ed;
    --accent-glow: rgba(192, 200, 212, 0.08);

    /* Subtle blue highlight */
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.12);

    /* Surfaces */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --divider: rgba(255, 255, 255, 0.05);

    /* Fonts */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-smooth: cubic-bezier(0.22, 0.68, 0, 1);
    --duration-slow: 1.4s;
    --duration-med: 0.8s;
    --duration-fast: 0.4s;
}

/* ── Reset ─────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Subtle grain */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ── Cursor Glow ───────────────────────────── */
.cursor-glow {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: background var(--duration-fast) ease, backdrop-filter var(--duration-fast) ease;
}

.navbar.scrolled {
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--duration-fast) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* GitHub Icon — top right, white semi-transparent */
.github-link {
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--duration-fast) ease, transform var(--duration-fast) ease;
    display: flex;
    align-items: center;
}

.github-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 1px;
    background: var(--text-primary);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: var(--space-xs);
    margin-left: var(--space-md);
    padding-left: var(--space-md);
    border-left: 1px solid var(--divider);
}

.lang-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 4px;
}

.lang-link:hover,
.lang-link.active {
    color: var(--accent);
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.97);
    backdrop-filter: blur(30px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-med) ease;
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav a {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
    transition: color var(--duration-fast) ease;
}

.mobile-nav a:hover {
    color: var(--accent);
}

.mobile-github {
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    margin-top: var(--space-sm);
}

.mobile-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 2rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 860px) {

    .nav-links,
    .github-link {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-md);
    max-width: 800px;
}

/* ── Hero Animation System ─────────────────
   Single source of animation — NO conflicts.
   Uses GPU-accelerated transform3d + opacity
   with staggered delays via data-delay attr.
   ──────────────────────────────────────────── */
.hero-anim {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    will-change: transform, opacity;
}

.hero-anim.is-visible {
    animation: heroEntrance var(--duration-slow) var(--ease-smooth) forwards;
}

/* Staggered delays */
.hero-anim[data-delay="0"].is-visible {
    animation-delay: 0.2s;
}

.hero-anim[data-delay="1"].is-visible {
    animation-delay: 0.45s;
}

.hero-anim[data-delay="2"].is-visible {
    animation-delay: 0.7s;
}

.hero-anim[data-delay="3"].is-visible {
    animation-delay: 0.95s;
}

.hero-anim[data-delay="4"].is-visible {
    animation-delay: 1.2s;
}

.hero-anim[data-delay="5"].is-visible {
    animation-delay: 1.5s;
}

@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: translate3d(0, 50px, 0);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.hero-logo-badge {
    margin-bottom: var(--space-md);
}

.hero-logo-img {
    height: 80px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
    opacity: 0.7;
    filter: brightness(1.2);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.hero-credential {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.hero-credential svg {
    color: var(--accent);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.7em;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--accent);
    padding: 1em 2em;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.hero-cta:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(192, 200, 212, 0.25);
}

.hero-cta-secondary {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 1em 2em;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.hero-cta-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Override default position when used with hero-anim */
.hero-scroll-indicator.hero-anim {
    transform: translateX(-50%) translate3d(0, 50px, 0);
}

.hero-scroll-indicator.hero-anim.is-visible {
    animation: heroScrollEntrance var(--duration-slow) var(--ease-smooth) forwards;
}

@keyframes heroScrollEntrance {
    0% {
        opacity: 0;
        transform: translateX(-50%) translate3d(0, 50px, 0);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* ═══════════════════════════════════════════
   COMMON SECTION STYLES
   ═══════════════════════════════════════════ */
.section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: var(--space-sm);
}

.section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════
 /* Erasmus List */
.erasmus-list {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.erasmus-item {
    background: var(--color-bg-alt);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.erasmus-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.erasmus-year {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -10px;
    right: 10px;
    line-height: 1;
}

.erasmus-content {
    position: relative;
    z-index: 1;
}

.erasmus-content h3 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.erasmus-loc {
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

.erasmus-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.erasmus-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ═══════════════════════════════════════════
   CERTIFICATES SECTION
   ═══════════════════════════════════════════ */
.certificates-section {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--divider);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.certificate-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.certificate-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--color-accent);
}

.certificate-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
}

.certificate-info h3 {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.certificate-issuer {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 2px;
}

.certificate-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.linkedin-btn-container {
    text-align: center;
    margin-top: var(--space-xl);
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0077b5;
    color: white;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background 0.2s;
}

.linkedin-btn:hover {
    background: #006097;
}

/* ═══════════════════════════════════════════
   ABOUT SECTION (Homepage)
   ═══════════════════════════════════════════ */
.about-section {
    padding: var(--space-2xl) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-text p {
    margin-bottom: var(--space-md);
    font-size: 1rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--divider);
}

.about-stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

.about-stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.about-portrait {
    position: relative;
}

.about-portrait img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top;
    filter: grayscale(20%);
    transition: filter var(--duration-slow) ease;
}

.about-portrait:hover img {
    filter: grayscale(0%);
}

/* Accent corner */
.about-portrait::before {
    content: '';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 50%;
    height: 50%;
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
    opacity: 0.3;
    pointer-events: none;
}

@media (max-width: 860px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about-stats {
        flex-wrap: wrap;
        gap: var(--space-md);
    }
}

/* ═══════════════════════════════════════════
   PORTFOLIO PREVIEW (Homepage)
   ═══════════════════════════════════════════ */
.portfolio-preview {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--divider);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.portfolio-card {
    display: block;
    text-decoration: none;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--color-accent);
}

.portfolio-card-visual {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #0f172a;
    /* Dark background for logos */
}

/* Specific style for logos in portfolio */
.portfolio-card-preview img.is-logo {
    object-fit: contain;
    padding: 3rem;
    /* Increased padding for breathability */
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    /* Subtle gradient depth */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-card:hover .portfolio-card-preview img.is-logo {
    transform: scale(1.05);
    /* Gentle zoom on hover */
}



.portfolio-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -20px rgba(192, 200, 212, 0.1);
}

.portfolio-card-visual {
    position: relative;
}

.portfolio-card-browser {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--divider);
}

.browser-dots {
    display: flex;
    gap: 4px;
}

.browser-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
}

.browser-url {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-left: auto;
}

.portfolio-card-preview {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.portfolio-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: all var(--duration-slow) var(--ease-smooth);
}

.portfolio-card:hover .portfolio-card-preview img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.portfolio-card-info {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.portfolio-card-info h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.portfolio-card-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.portfolio-card-arrow {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
    margin-left: var(--space-xs);
}

.portfolio-card:hover .portfolio-card-arrow {
    opacity: 1;
}

@media (max-width: 860px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   PHOTO GALLERY (Homepage)
   ═══════════════════════════════════════════ */
.gallery-section {
    padding: var(--space-xl) 0 var(--space-2xl);
    border-top: 1px solid var(--divider);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.gallery-item {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
}

.gallery-item--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter var(--duration-slow) ease, transform var(--duration-slow) ease;
}

.gallery-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item--wide {
        grid-column: span 1;
    }
}

/* ═══════════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════════ */
.cta-banner {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--divider);
    text-align: center;
}

.cta-banner h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.cta-banner p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.cta-btn {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--accent);
    padding: 1em 2.5em;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.cta-btn:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(192, 200, 212, 0.25);
}

/* ═══════════════════════════════════════════
   PAGE HEADER (Subpages)
   ═══════════════════════════════════════════ */
.page-header {
    padding-top: calc(var(--space-2xl) + 60px);
    padding-bottom: var(--space-xl);
    text-align: center;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════
   SERVICES (Services Page)
   ═══════════════════════════════════════════ */
.services-section {
    padding-bottom: var(--space-2xl);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--divider);
}

.service-card {
    background: var(--bg-primary);
    padding: var(--space-lg) var(--space-md);
    transition: background var(--duration-fast) ease;
    position: relative;
}

.service-card:hover {
    background: var(--bg-card);
}

.service-icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-md);
}

.service-icon-wrap svg {
    width: 100%;
    height: 100%;
    color: var(--accent);
}

.service-number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.3;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: var(--space-xs);
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.service-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tags li {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--glass-border);
    padding: 3px 8px;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   RESOURCES (Resources Page)
   ═══════════════════════════════════════════ */
.resources-section {
    padding-bottom: var(--space-2xl);
}

.resource-category {
    margin-bottom: var(--space-xl);
}

.resource-category-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--divider);
}

.resource-category-title svg {
    color: var(--accent);
}

.resource-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: var(--space-md);
    transition: all var(--duration-fast) ease;
}

.resource-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.resource-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: var(--space-xs);
}

.resource-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.resource-tag {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--glass-border);
    padding: 2px 8px;
}

.resource-github-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
}

.resource-github-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.resource-github-content svg {
    color: var(--accent);
    flex-shrink: 0;
}

.resource-github-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 400;
}

.resource-github-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 860px) {
    .resource-cards {
        grid-template-columns: 1fr;
    }

    .resource-github-banner {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .resource-github-content {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════
   CONTACT (Contact Page)
   ═══════════════════════════════════════════ */
.contact-section {
    padding-bottom: var(--space-2xl);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.contact-info>p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.contact-method svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-method-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.contact-method a,
.contact-method span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--duration-fast) ease;
}

.contact-method a:hover {
    color: var(--accent);
}

.contact-availability {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--divider);
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2em 0 0.6em;
    background: none;
    border: none;
    border-bottom: 1px solid var(--divider);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--duration-fast) ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--accent);
}

.form-group label {
    position: absolute;
    top: 1.2em;
    left: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all var(--duration-fast) ease;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: 0;
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-submit {
    align-self: flex-start;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--accent);
    border: none;
    padding: 1em 2.5em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.form-submit:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(192, 200, 212, 0.25);
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--divider);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-logo {
    height: 24px;
    width: auto;
    opacity: 0.5;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-github {
    color: rgba(255, 255, 255, 0.3);
    transition: color var(--duration-fast) ease;
}

.footer-github:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL ANIMATION SYSTEM
   GPU-accelerated, world-class easing.
   Uses translate3d for hardware acceleration
   and will-change for hint to compositor.
   ═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    will-change: transform, opacity;
    transition: opacity var(--duration-slow) var(--ease-smooth),
        transform var(--duration-slow) var(--ease-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Staggered reveal for children within a grid */
.portfolio-grid.visible .portfolio-card,
.services-grid .service-card.reveal.visible,
.gallery-grid.visible .gallery-item {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.portfolio-grid .portfolio-card,
.gallery-grid .gallery-item {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.8s var(--ease-smooth),
        transform 0.8s var(--ease-smooth);
}

.portfolio-grid.visible .portfolio-card:nth-child(1) {
    transition-delay: 0.1s;
}

.portfolio-grid.visible .portfolio-card:nth-child(2) {
    transition-delay: 0.25s;
}

.portfolio-grid.visible .portfolio-card:nth-child(3) {
    transition-delay: 0.4s;
}

.gallery-grid.visible .gallery-item:nth-child(1) {
    transition-delay: 0.05s;
}

.gallery-grid.visible .gallery-item:nth-child(2) {
    transition-delay: 0.15s;
}

.gallery-grid.visible .gallery-item:nth-child(3) {
    transition-delay: 0.25s;
}

.gallery-grid.visible .gallery-item:nth-child(4) {
    transition-delay: 0.35s;
}

.gallery-grid.visible .gallery-item:nth-child(5) {
    transition-delay: 0.45s;
}

.gallery-grid.visible .gallery-item:nth-child(6) {
    transition-delay: 0.55s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .hero-anim,
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}