/* =========================================
   ROOT VARIABLES
========================================= */
:root {
    --bg-primary: #ECE5E0;
    --bg-secondary: #FFFEFC;
    --text-primary: #1C1C1C;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent: #0176d3;
    --accent-light: #E8F0F7;
    --border: #E6E2DC;

    --shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02);

    --shadow-lg:
        0 10px 40px rgba(0, 0, 0, 0.07);

    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* =========================================
   RESET
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    display: block;
}
button,
input,
textarea {
    font: inherit;
}
/* =========================================
   NAVIGATION
========================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 243, 239, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
nav.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow);
}
.nav-container {
    max-width: 1100px;

    height: 70px;

    margin: 0 auto;
    padding: 0 2rem;

    display: grid;

    grid-template-columns: auto 1fr auto;

    align-items: center;

    gap: 2rem;
}

.nav-logo {
    font-family: "Playfair Display", serif;

    font-size: 1.25rem;
    font-weight: 600;

    color: var(--text-primary);

    text-decoration: none;

    letter-spacing: -0.02em;

    white-space: nowrap;
}

.nav-links {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 2.5rem;

    list-style: none;

    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 0.875rem;
    font-weight: 500;

    transition: var(--transition);

    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}
.nav-links a:hover {
    color: var(--text-primary);
}
.nav-links a:hover::after {
    width: 100%;
}
.mobile-menu-btn {
    display: none;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}
/* =========================================
   DARK MODE VARIABLES
========================================= */
body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-light: #0c2a3a;
    --border: #1e293b;
    --shadow:
        0 1px 3px rgba(0, 0, 0, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-lg:
        0 10px 40px rgba(0, 0, 0, 0.35);
}
body.dark-mode nav {
    background: rgba(15, 23, 42, 0.85);
}
/* =========================================
   THEME TOGGLE
========================================= */
.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(15deg);
}
/* =========================================
   GENERAL SECTIONS
========================================= */
section {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem;
}
.section-label {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.section-title {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
}
/* =========================================
   HERO
========================================= */
#hero {
    min-height: 100vh;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    overflow: hidden;
}
.hero-content {
    width: 100%;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}
.hero-text {
    position: relative;
    z-index: 2;
}
.hero-greeting {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0;
    animation:
        fadeInUp 0.8s ease forwards;
}
.hero-name {
    margin-bottom: 1.5rem;
    font-family: "Playfair Display", serif;
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    opacity: 0;
    animation:
        fadeInUp 0.8s ease 0.2s forwards;
}
.hero-tagline {
    max-width: 650px;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    opacity: 0;
    animation:
        fadeInUp 0.8s ease 0.4s forwards;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation:
        fadeInUp 0.8s ease 0.6s forwards;
}
/* =========================================
   HERO IMAGE
========================================= */
.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}
.hero-image-ring {
    position: absolute;
    inset: -15px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    opacity: 0.25;
    animation: rotateRing 15s linear infinite;
}
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}
/* =========================================
   HERO DECORATIVE SHAPES
========================================= */
.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-light);
    opacity: 0.45;
    filter: blur(1px);
}
.hero-shape:nth-child(1) {
    width: 180px;
    height: 180px;
    top: 15%;
    right: 5%;
}
.hero-shape:nth-child(2) {
    width: 100px;
    height: 100px;
    bottom: 15%;
    left: 5%;
    opacity: 0.3;
}
.hero-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 40%;
    opacity: 0.25;
}
/* =========================================
   HERO SCROLL
========================================= */
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0;
    animation:
        fadeIn 1s ease 1.2s forwards;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background:
        linear-gradient(
            to bottom,
            var(--accent),
            transparent
        );
    animation:
        scrollPulse 2s ease infinite;
}
/* =========================================
   BUTTONS
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding:
        0.875rem
        2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow:
        0 4px 14px rgba(1, 118, 211, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(1, 118, 211, 0.4);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.cv-download-wrapper {
    position: relative;
    display: inline-block;
}

.cv-download-popup {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);

    background: var(--card-bg, #222);
    color: var(--text-color, #fff);

    padding: 9px 15px;
    border-radius: 8px;

    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.25s ease,
                transform 0.25s ease,
                visibility 0.25s ease;

    z-index: 100;
}

/* Small arrow pointing towards the button */
.cv-download-popup::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 0 7px 7px;
    border-style: solid;
    border-color: transparent transparent var(--card-bg, #222);
}

/* Show popup on hover or keyboard focus */
.cv-download-wrapper:hover .cv-download-popup,
.cv-download-wrapper:focus-within .cv-download-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* =========================================
   ABOUT
========================================= */
#about {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 4rem;
}
.about-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.about-image-bg {
    position: absolute;
    width: 85%;
    height: 85%;
    right: -10px;
    bottom: -10px;
    background: var(--accent-light);
    border-radius: var(--radius);
}
.about-image {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}
.about-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}
.stat-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-number {
    margin-bottom: 0.4rem;
    color: var(--accent);
    font-family: "Playfair Display", serif;
    font-size: 2.25rem;
    font-weight: 700;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}
/* =========================================
   SKILLS
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );
    gap: 1.5rem;
    margin-top: 2rem;
}
.skill-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}
.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.skill-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}
.skill-title {
    font-size: 1.05rem;
    font-weight: 600;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-tag {
    padding:
        0.375rem
        0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
}
/* =========================================
   EXPERIENCE TIMELINE
========================================= */
.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 2rem;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background:
        linear-gradient(
            to bottom,
            var(--accent),
            var(--border)
        );
}
.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    transform: translateX(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}
.timeline-item::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: -2rem;
    width: 10px;
    height: 10px;
    transform: translateX(-4px);
    background: var(--accent);
    border-radius: 50%;
    box-shadow:
        0 0 0 4px var(--bg-primary);
}
.timeline-date {
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}
.timeline-role {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.timeline-company {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}
.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.timeline-desc ul {
    padding-left: 1.25rem;
}
.timeline-desc li {
    margin-bottom: 0.5rem;
}
/* =========================================
   EXPERIENCE TECHNOLOGIES
========================================= */
.timeline-tech {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top:
        1px solid var(--border);
}
.timeline-tech-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.timeline-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
/* =========================================
   CERTIFICATIONS
========================================= */
.certs-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );
    gap: 1.5rem;
    margin-top: 2rem;
}
.cert-card {
    position: relative;
    padding: 2rem;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}
.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.cert-card.retired::after {
    content: "Retired";
    position: absolute;
    top: 1rem;
    right: -2rem;
    padding:
        0.25rem
        2.5rem;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    transform: rotate(45deg);
}
.cert-badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin:
        0 auto
        1.25rem;
    background: var(--accent-light);
    border-radius: 50%;
    font-size: 1.5rem;
}
.cert-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}
.cert-name {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}
.cert-issuer {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* =========================================
   PROJECT
========================================= */

.project-featured {
    margin-top: 2rem;
    overflow: hidden;

    background: var(--bg-secondary);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition: var(--transition);
}

.project-featured:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}


/* =========================================
   PROJECT HEADER
========================================= */

.project-header {
    padding: 3rem 3rem 1.5rem;

    border-bottom: 1px solid var(--border);
}

.project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1.5rem;

    margin-bottom: 1.5rem;
}

.project-title {
    display: flex;
    align-items: center;

    gap: 0.75rem;

    color: var(--text-primary);

    font-family: "Playfair Display", serif;

    font-size: 2rem;
    font-weight: 600;

    line-height: 1.2;
}

.project-title img {
    width: 42px;
    height: 42px;

    object-fit: contain;

    border-radius: 8px;

    flex-shrink: 0;
}


/* =========================================
   GITHUB BUTTON
========================================= */

.project-github-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 0.5rem;

    padding: 0.65rem 1rem;

    background: var(--bg-primary);

    color: var(--text-primary);

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    font-family: "Inter", sans-serif;

    font-size: 0.8rem;
    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition: var(--transition);

    flex-shrink: 0;
}

.project-github-btn svg {
    width: 18px;
    height: 18px;

    flex-shrink: 0;
}

.project-github-btn:hover {
    color: var(--accent);

    background: var(--accent-light);

    border-color: var(--accent);

    transform: translateY(-2px);

    box-shadow: var(--shadow);
}


/* =========================================
   PROJECT SUBTITLE
========================================= */

.project-subtitle {
    color: var(--text-secondary);

    font-size: 1rem;

    line-height: 1.7;
}

.project-subtitle ul {
    margin: 0;

    padding-left: 1.25rem;
}

.project-subtitle li {
    margin-bottom: 0.4rem;
}

.project-subtitle li:last-child {
    margin-bottom: 0;
}


/* =========================================
   PROJECT BODY
========================================= */

.project-body {
    padding: 2rem 3rem 3rem;
}


/* =========================================
   PROJECT IMAGE
========================================= */

.project-image {
    width: 100%;
    height: 300px;

    margin-bottom: 2.5rem;

    object-fit: cover;

    border-radius: var(--radius-sm);

    border: 1px solid var(--border);
}


/* =========================================
   PROJECT FEATURES / CASE STUDY
========================================= */

.project-features {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );

    gap: 1.75rem;
}


/* =========================================
   FEATURE ITEM
========================================= */

.feature-item {
    display: flex;

    align-items: flex-start;

    gap: 1rem;
}

.feature-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--accent-light);

    border-radius: var(--radius-sm);

    font-size: 1rem;
}

.feature-text {
    min-width: 0;
}

.feature-text h4 {
    margin-bottom: 0.35rem;

    color: var(--text-primary);

    font-size: 0.95rem;

    font-weight: 600;
}

.feature-text p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 0.875rem;

    line-height: 1.6;
}


/* =========================================
   PROJECT TECHNOLOGIES
========================================= */

.project-tech {
    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    margin-top: 2.5rem;

    padding-top: 1.5rem;

    border-top: 1px solid var(--border);
}

.tech-tag {
    padding:
        0.375rem
        1rem;

    background: var(--accent-light);

    border-radius: 100px;

    color: var(--accent);

    font-size: 0.8rem;

    font-weight: 600;
}


/* =========================================
   PROJECT MOBILE
========================================= */

@media (max-width: 768px) {

    .project-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .project-title-row {
        align-items: flex-start;

        gap: 1rem;
    }

    .project-title {
        font-size: 1.6rem;
    }

    .project-title img {
        width: 38px;
        height: 38px;
    }

    .project-github-btn {
        padding:
            0.6rem
            0.7rem;
    }

    .project-github-btn span {
        display: none;
    }

    .project-body {
        padding:
            2rem
            1.5rem
            2.5rem;
    }

    .project-image {
        height: 220px;

        margin-bottom: 2rem;
    }

    .project-features {
        grid-template-columns: 1fr;

        gap: 1.5rem;
    }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .project-title-row {
        align-items: center;
    }

    .project-title {
        font-size: 1.4rem;
    }

    .project-title img {
        width: 34px;
        height: 34px;
    }

    .project-github-btn {
        width: 38px;
        height: 38px;

        padding: 0;

        border-radius: 50%;
    }

    .project-github-btn svg {
        width: 17px;
        height: 17px;
    }

    .project-image {
        height: 180px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
    }

    .project-tech {
        margin-top: 2rem;
    }
}

.arch-title {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.arch-layer {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.arch-label {
    min-width: 80px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.arch-box {
    flex: 1;
    min-width: 140px;
    padding:
        1rem
        1.5rem;
    background: #ffffff;
    border:
        1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}
.arch-box:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}
.arch-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
    text-align: center;
}
.project-features {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px, 1fr)
        );
    gap: 1.5rem;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.feature-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}
.feature-text h4 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.feature-text p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top:
        1px solid var(--border);
}
.tech-tag {
    padding:
        0.375rem
        1rem;
    background: var(--accent-light);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}
/* =========================================
   CONTACT
========================================= */
#contact {
    text-align: center;
}
.contact-text {
    max-width: 550px;
    margin:
        1.5rem auto
        2.5rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}
.contact-email {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}
.contact-email:hover {
    color: var(--accent);
}
.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding:
        0.875rem
        1.5rem;
    background: var(--bg-secondary);
    border:
        1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}
/* =========================================
   FOOTER
========================================= */
footer {
    padding: 3rem 2rem;
    border-top:
        1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}
/* =========================================
   SCROLL REVEAL
========================================= */
.reveal {
    opacity: 0;
    transform:
        translateY(40px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform:
        translateY(0);
}
/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform:
            translateY(30px);
    }
    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes scrollPulse {
    0%,
    100% {
        opacity: 1;
        transform:
            scaleY(1);
    }
    50% {
        opacity: 0.5;
        transform:
            scaleY(0.7);
    }
}
@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
/* =========================================
   MOBILE NAVIGATION
========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-links.mobile-open {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding:
            0.75rem
            1.5rem
            1rem;
        background:
            rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(20px);
        border-bottom:
            1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav-links.mobile-open li {
        padding: 0.75rem 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    /* Hero */
    #hero {
        min-height: 100svh;
        padding-top: 100px;
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-text {
        order: 2;
    }
    .hero-image-wrapper {
        order: 1;
        width: 240px;
        height: 240px;
    }
    .hero-tagline {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-scroll {
        display: none;
    }
    /* Sections */
    section {
        padding:
            4rem 1.5rem;
    }
    /* About */
    #about {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about-image-wrapper {
        max-width: 600px;
    }
    /* Project */
    .project-header,
    .project-body {
        padding:
            2rem 1.5rem;
    }
    .project-image {
        height: 220px;
    }
    .timeline {
        padding-left: 1.5rem;
    }
    .timeline-item::before {
        left: -1.5rem;
    }
}
/* =========================================
   SMALL MOBILE
========================================= */
@media (max-width: 480px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-name {
        font-size: 2.5rem;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
    }
    .hero-image-wrapper {
        width: 200px;
        height: 200px;
    }
    .about-stats {
        grid-template-columns: auto 1fr auto;
    }
    .project-features {
        grid-template-columns: auto 1fr auto;
    }
    .arch-layer {
        flex-direction: column;
        align-items: stretch;
    }
    .arch-label {
        min-width: unset;
    }
    .arch-box {
        width: 100%;
    }
    .contact-email {
        font-size: 1.2rem;
        word-break: break-word;
    }
}
/* =========================================
   REDUCED MOTION
========================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   VISITOR COUNTER
======================================== */

.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    margin-top: 1rem;

    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.visitor-icon {
    color: var(--accent);
    font-size: 1rem;
}

#visit-count {
    color: var(--accent);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
