/* -----------------------------
   RESET / BASE
------------------------------*/

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

:root {
    /* background image (swap this file whenever you want) */
    --bg-image: url("assets/purple_mountain.png");
    --bg-base: #0f0b16;
    --bg-overlay: rgba(255, 246, 238, 0.45);
    --grain-opacity: 0.28;

    /* card surfaces (warm paper) */
    --surface: rgba(255, 251, 247, 0.94);
    --surface-muted: rgba(255, 242, 234, 0.9);

    /* text */
    --text: #241a2e;
    --text-muted: #4d3c60;
    --text-muted-strong: #3a2c4a;

    /* accent (warm terracotta) */
    --accent: #456c55;
    --accent-strong: #68cc9b;
    --accent-soft: rgba(225, 156, 180, 0.18);

    /* borders/shadow */
    --border-subtle: rgba(70, 56, 78, 0.18);

    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-soft: 0 18px 40px rgba(18, 12, 24, 0.16);
    --shadow-lift: 0 12px 28px rgba(18, 12, 24, 0.18);
    --transition-fast: 140ms ease-out;
}

html,
body {
    min-height: 100%;
}

body {
    position: relative;
    background-color: var(--bg-base);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text);
    font-family:
        "SF Pro Text",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    line-height: 1.6;
    font-size: 15.5px;
}

@media (min-width: 900px) {
    body {
        background-attachment: fixed;
    }
}

/* soft wash over background image */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(255, 255, 255, 0.55),
            transparent 60%
        ),
        linear-gradient(180deg, var(--bg-overlay), rgba(255, 246, 238, 0.25));
    opacity: 0.6;
}

/* subtle paper grain overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='noStitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.18'/></svg>");
    mix-blend-mode: soft-light;
    opacity: var(--grain-opacity);
}

img {
    max-width: 100%;
    display: block;
}

/* Layout shell */
.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 18px;
}

/* -----------------------------
   NAVBAR
------------------------------*/

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(24, 18, 32, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(16, 12, 20, 0.24);
}

/* header grain only */
.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;

    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='noStitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");

    mix-blend-mode: normal;
    opacity: 0.35;
}

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

.nav-brand a {
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f9f1ea;
    letter-spacing: 0.01em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 18px;
}

.nav-links a {
    color: #efe7e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition:
        color var(--transition-fast),
        opacity var(--transition-fast);
    opacity: 0.85;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    opacity: 1;
}

/* -----------------------------
   HERO + SOCIAL CONTACT
------------------------------*/

.hero {
    position: relative;
    max-width: 1040px;
    margin: 16px auto 14px;
    padding: 24px 24px 22px;

    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(6px);
    overflow: hidden;
}

/* avoid double-padding inside hero */
.hero > .container {
    max-width: 100%;
    padding: 0;
}

/* soft sage glow in hero */
.hero::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -30px;
    width: 280px;
    height: 280px;
    background: radial-gradient(
        circle at center,
        rgba(255, 235, 220, 0.75) 0,
        transparent 60%
    );
    opacity: 0.8;
    filter: blur(2px);
    pointer-events: none;
    z-index: -1;
}

/* hero text */
.hero h1 {
    font-size: clamp(1.9rem, 2.4vw + 1rem, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    /* font-weight: 700; */
    margin-bottom: 0.1em;
    color: var(--text);
}

.hero h1 span.highlight {
    font-weight: 600;
}

.highlight {
    color: var(--accent-strong);
}

.subtitle {
    color: var(--text-muted);
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    border: 1px solid var(--accent-soft);
    width: fit-content;
}

.status-line {
    margin-top: 10px;
    color: var(--text-muted-strong);
    font-size: 0.95rem;
    font-style: italic;
    padding-left: 0.55rem;
    border-left: 2px solid var(--accent-soft);
}

/* integrated social/contact bar */
.hero-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.now-listening {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px dashed var(--border-subtle);
    background: rgba(255, 255, 255, 0.8);
    width: fit-content;
    box-shadow: 0 10px 18px rgba(18, 12, 24, 0.08);
}

.now-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.now-track {
    color: var(--text-muted-strong);
    font-size: 0.9rem;
    text-decoration: none;
}

.now-track:hover {
    text-decoration: underline;
}

.social-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}

.social-bar-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.social-bar-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.9rem;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.social-link i {
    font-size: 0.95rem;
}

.social-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* footer social links (subtle) */
.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent-strong);
    transform: translateY(-1px);
}

/* -----------------------------
   GENERIC SECTION CARD
------------------------------*/
.hero,
.section,
.dev-archetype,
.devlog-entry,
.page-header,
.cta-section,
footer {
    position: relative;
    z-index: 1;
}
.section,
.dev-archetype,
.devlog-entry,
.page-header,
.cta-section {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 22px 20px;
    margin-bottom: 18px;
    backdrop-filter: blur(4px);
}

/* subtle underline to headings */
.section h2,
.page-header h1,
.dev-archetype h2,
.cta-section h2,
.devlog-entry h2 {
    position: relative;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section h2::after,
.page-header h1::after,
.dev-archetype h2::after,
.cta-section h2::after,
.devlog-entry h2::after {
    content: "";
    display: block;
    margin-top: 4px;
    width: 132px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-strong), transparent);
    opacity: 0.9;
}

/* -----------------------------
   TYPOGRAPHY
------------------------------*/

h1,
h2,
h3 {
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.15rem;
    margin-top: 12px;
}

p {
    color: var(--text-muted);
    margin-bottom: 0.9em;
}

ul {
    margin-left: 1.2em;
    color: var(--text-muted);
}

/* -----------------------------
   SKILL CARDS / GRID (HOME)
------------------------------*/

.skills-grid {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.skill-card {
    padding: 14px 12px;
    background: var(--surface-muted);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(86, 70, 58, 0.18);
    text-align: left;
    box-shadow: var(--shadow-lift);
}

/* -----------------------------
   TAGS / BUTTONS
------------------------------*/

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffffbf;
    border: 1px solid #e2dcd1;
    color: #3b3833;
    font-size: 0.8rem;
}

/* primary and small buttons */
.btn,
.btn-small {
    display: inline-block;
    text-decoration: none;
    color: #fdfbf7;
    background: var(--accent);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition:
        filter var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn:hover,
.btn-small:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.btn-small {
    font-size: 0.85rem;
}

/* -----------------------------
   DEVLOG-SPECIFIC
------------------------------*/
body .hero:nth-of-type(1):has(h1 + p) {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    background: #f8f3ec;
}

.page-header p {
    color: var(--text-muted);
}

.devlogs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.devlog-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.devlog-description {
    color: var(--text-muted-strong);
    font-size: 0.95rem;
    font-style: italic;
    padding-left: 0.4rem;
    border-left: 2px solid var(--accent-soft);
}

.devlog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.devlog-date {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.devlog-tags {
    display: flex;
    gap: 6px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.devlog-content h3 {
    margin-top: 14px;
}

.devlog-links {
    margin-top: 10px;
}

/* -----------------------------
   CTA
------------------------------*/

.cta-section p {
    color: var(--text-muted);
}

/* -----------------------------
   FOOTER
------------------------------*/

footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 18px;
    color: var(--text-muted);
    padding-bottom: 28px;
}

footer p {
    margin-top: 10px;
    text-align: center;
    color: var(--accent-strong);
}

/* -----------------------------
   RESPONSIVE
------------------------------*/

@media (max-width: 720px) {
    .container {
        padding: 22px 14px;
    }

    .hero {
        margin: 18px 14px 16px;
        padding: 18px 16px 16px;
    }

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

    .dev-archetype,
    .devlog-entry,
    .page-header,
    .cta-section {
        padding: 18px 16px;
    }
}
