/* ==========================================================================
   Hard-Shadow Design System — slate blue palette
   Depth comes only from solid, un-blurred offset shadows. Corners stay
   square everywhere. One ink color drives text, borders, shadows, and
   primary buttons. See CLAUDE.md for the full set of rules.
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light;

    /* Base */
    --ink: #16191e;
    --ink-soft: #3d444d;

    --paper: #f2f4f1;
    --paper-strong: #649fd3;
    --accent: #b0c9e2;

    /* Warm companions to the blue — same family, turned up a notch.
       Used only for project covers, section chips, and small markers;
       buttons, tags, and card surfaces stay in the blue family. */
    --accent-coral: #e28568;
    --accent-apricot: #ecaa4f;
    --accent-rose: #d983ae;

    /* Surfaces (translucent so the page background shows through) */
    --surface: rgba(242, 244, 241, 0.9);
    --surface-card: rgba(176, 201, 226, 0.85);
    --surface-section: rgba(242, 244, 241, 0.6);

    /* Lines */
    --border: rgba(22, 25, 30, 0.08);
    --border-hard: 2px solid var(--ink);

    /* Shadows — zero blur, zero spread, full-opacity ink */
    --shadow: 7px 7px 0 var(--ink);
    --shadow-sm: 5px 5px 0 var(--ink);

    /* Semantic */
    --positive: #2e7d4f;
    --negative: #c0392b;
}

html {
    scroll-behavior: smooth;
    /* iOS Safari ignores overflow-x on body alone */
    overflow-x: hidden;
}

body {
    font-family: 'Avenir Next', 'Segoe UI Variable', 'Segoe UI', -apple-system,
        BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--ink);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(176, 201, 226, 0.7), transparent 30%),
        radial-gradient(circle at top right, rgba(22, 25, 30, 0.05), transparent 26%),
        linear-gradient(180deg, #f7f9f6 0%, #edf2f2 50%, #d9e5ec 100%);
    background-attachment: fixed;
}

/* One shell, one layer of side padding (like StudyApp's .app-shell).
   Sections and cards must NOT add their own horizontal page padding. */
.container {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* Entry reveal: fade up on scroll. JS removes both classes after the
   reveal so component hover transitions take back over. */
.fade-in-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease !important;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--paper);
    border-bottom: var(--border-hard);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.nav-brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--ink);
    color: var(--paper-strong);
    padding: 0.35rem 0.7rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 650;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.5rem;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--ink);
    color: var(--paper-strong);
}

.nav-menu a:focus-visible {
    outline: 2px solid rgba(22, 25, 30, 0.2);
    outline-offset: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 7rem 24px 4rem;
    position: relative;
}

.hero-content {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 3rem 2.5rem;
    max-width: 720px;
    animation: fadeIn 0.28s ease-in-out;
}

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

.hero-title {
    font-size: clamp(1.85rem, 3.5vw, 3rem);
    line-height: 1;
    letter-spacing: -0.03em;
    max-width: 16ch;
    margin: 0 auto 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 0.75rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    border: 0;
    border-radius: 0;
    padding: 11px 16px;
    font-weight: 650;
    font-size: 0.9rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--ink);
}

.btn:focus-visible {
    outline: 2px solid rgba(22, 25, 30, 0.2);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper-strong);
}

.btn-secondary {
    background: rgba(176, 201, 226, 0.8);
    color: var(--ink);
}

/* ==========================================================================
   Sections
   ========================================================================== */
section {
    padding: 5rem 0;
}

.section-inner {
    background: var(--surface-section);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
}

/* Section headings render as opaque accent chips, not plain text.
   Each section gets its own hue so the warm accents recur site-wide. */
.section-title {
    display: inline-block;
    background: var(--paper-strong);
    color: var(--ink);
    padding: 0.45rem 0.8rem;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    box-shadow: none;
}

.section-title--coral { background: var(--accent-coral); }
.section-title--apricot { background: var(--accent-apricot); }
.section-title--rose { background: var(--accent-rose); }

/* ==========================================================================
   About
   ========================================================================== */
.about-text p {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
    line-height: 1.6;
    max-width: 65ch;
}

/* ==========================================================================
   Skills
   ========================================================================== */
/* Endless strip of tech logos drifting left-to-right. The one continuous
   animation on the site: linear, slow, pauses on hover, off under
   prefers-reduced-motion. Logos keep their official brand colors — the
   single exception to the palette; labels stay ink. */
.marquee {
    overflow: hidden;
    background: var(--paper);
    border: var(--border-hard);
    padding: 14px 0;
    margin-bottom: 2rem;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 44px;
    width: max-content;
    padding-left: 44px;
    animation: marquee-drift 36s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-drift {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--ink);
}

.marquee-item svg {
    width: 24px;
    height: 24px;
}

.marquee-item span {
    font-size: 0.8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--surface-card);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.skill-card:hover {
    transform: translateY(-2px);
    background: rgba(176, 201, 226, 0.92);
}

.skill-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Small colored square in place of an icon; hue rotates per card */
.skill-card h3::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--paper-strong);
    flex-shrink: 0;
}

.skill-card:nth-child(2) h3::before { background: var(--accent-coral); }
.skill-card:nth-child(3) h3::before { background: var(--accent-apricot); }
.skill-card:nth-child(4) h3::before { background: var(--accent-rose); }

/* Skill entries are flat chips — the shadowed card carries the depth */
.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.skill-list li {
    padding: 0.3rem 0.6rem;
    background: rgba(242, 244, 241, 0.86);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    display: block;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface-card);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    background: rgba(176, 201, 226, 0.92);
}

.project-card:focus-visible {
    outline: 2px solid rgba(22, 25, 30, 0.2);
    outline-offset: 2px;
}

/* Line-art pictogram on a colored cover instead of a thumbnail image;
   each project gets its own hue from the palette */
.project-image {
    height: 140px;
    background: var(--paper-strong);
    border-bottom: var(--border-hard);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.project-image--coral { background: var(--accent-coral); }
.project-image--apricot { background: var(--accent-apricot); }
.project-image--rose { background: var(--accent-rose); }

.project-glyph {
    width: 64px;
    height: 64px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linejoin: miter;
    stroke-linecap: square;
}

.project-info {
    padding: 18px 20px;
}

.project-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.project-info > p {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tags stay flat — the contrast with shadowed cards creates hierarchy */
.tag {
    padding: 0.3rem 0.6rem;
    background: var(--paper-strong);
    font-size: 0.75rem;
    color: var(--ink);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: none;
}

/* ==========================================================================
   Contact — no form, just a direct email CTA and profile links
   ========================================================================== */
.contact-content {
    max-width: 560px;
}

.contact-content h3 {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.contact-content > p {
    color: var(--ink-soft);
    margin-bottom: 2rem;
    max-width: 45ch;
}

.contact-cta {
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-decoration: none;
    background: rgba(242, 244, 241, 0.86);
    border: 1px solid var(--border);
    padding: 12px 16px;
    transition: background-color 0.18s ease;
}

.contact-link:hover {
    background: var(--paper);
}

.contact-link:focus-visible {
    outline: 2px solid rgba(22, 25, 30, 0.2);
    outline-offset: 2px;
}

.contact-link .label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
}

/* Brand logos on contact links — same brand-color exception as the marquee */
.contact-glyph {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-link .value {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--ink);
    color: var(--paper);
    padding: 2rem 0;
    padding-bottom: max(48px, calc(24px + env(safe-area-inset-bottom, 0px)));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-links a {
    color: var(--paper-strong);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
    transition: opacity 0.18s ease;
}

.social-links a:hover {
    opacity: 1;
}

.social-links a:focus-visible {
    outline: 2px solid rgba(242, 244, 241, 0.5);
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive — at 720px, shadows step down 7px → 5px
   ========================================================================== */
@media (max-width: 720px) {
    .hero-content,
    .section-inner,
    .skill-card,
    .project-card {
        box-shadow: var(--shadow-sm);
    }

    /* Single, tighter padding layer on small screens */
    .container {
        padding: 0 12px;
    }

    .hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .section-inner {
        padding: 28px 12px;
    }

    .skill-card,
    .project-card .project-info {
        padding: 14px;
    }

    .nav-menu {
        gap: 0.75rem;
    }

    .nav-menu a {
        font-size: 0.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        display: none;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track {
        animation: none;
    }
}
