@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,600;9..144,700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=DM+Mono:wght@300;400;500&display=swap');

/* ==========================================
   VARIABLES
   ========================================== */
:root {
    --bg:            #faf6f0;
    --bg-alt:        #f2e9df;
    --surface:       #fffdf9;
    --border:        #e0cdb8;
    --coffee-light:  #c4956a;
    --coffee:        #8b5e3c;
    --coffee-dark:   #5c3d2e;
    --espresso:      #2c1a0f;
    --text:          #3d2b1f;
    --text-muted:    #9b8878;
    --tag-bg:        #ede0d0;
    --tag-text:      #6b4226;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Lora', Georgia, serif;
    --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

/* ==========================================
   NAV
   ========================================== */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: rgba(250, 246, 240, 0.93);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.nav-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--coffee-dark);
    letter-spacing: 0.06em;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--coffee);
}

/* ==========================================
   HERO
   ========================================== */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 2.5rem;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(196, 149, 106, 0.13) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    position: relative;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--coffee);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

#hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    color: var(--espresso);
    margin-bottom: 1rem;
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text);
    max-width: 540px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--surface);
    background: var(--coffee);
    padding: 0.75rem 1.75rem;
    border-radius: 2px;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background 0.2s, transform 0.1s;
}

.cta-btn:hover {
    background: var(--coffee-dark);
    transform: translateY(-1px);
}

/* ==========================================
   SECTIONS (shared)
   ========================================== */
section {
    padding: 5rem 2.5rem;
}

#about {
    background: var(--bg-alt);
}

.section-inner {
    max-width: 860px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--espresso);
    margin-bottom: 2.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--coffee-light);
    margin-top: 0.5rem;
}

/* ==========================================
   PROJECTS / TABS
   ========================================== */
.tab-group {
    margin-bottom: 1.25rem;
}

.tab-group-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.tab-link {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-link:hover {
    border-color: var(--coffee-light);
    color: var(--coffee);
}

.tab-link.active {
    background: var(--coffee);
    border-color: var(--coffee);
    color: var(--surface);
}

.tab-contents {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    padding: 2.5rem;
    min-height: 260px;
    margin-top: 1.75rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--espresso);
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.project-info p {
    color: var(--text);
    margin-bottom: 1.5rem;
}

.repo-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--coffee);
    text-decoration: none;
    border-bottom: 1px dashed var(--coffee-light);
    padding-bottom: 1px;
    transition: color 0.2s;
}

.repo-link:hover {
    color: var(--coffee-dark);
}

/* ==========================================
   GALLERY
   ========================================== */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-gallery img {
    width: 100%;
    border-radius: 3px;
    border: 1px solid var(--border);
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.project-gallery img:hover {
    opacity: 0.9;
}

.gallery-empty {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 180px;
    border: 1.5px dashed var(--coffee-light);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--coffee-light);
    background: var(--bg-alt);
}

/* ==========================================
   ABOUT
   ========================================== */
.about-content p {
    margin-bottom: 1.25rem;
    max-width: 640px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content strong {
    color: var(--coffee-dark);
    font-weight: 600;
}

/* ==========================================
   SKILLS
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
}

.skill-group h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--coffee);
    margin-bottom: 0.75rem;
}

.skill-group ul {
    list-style: none;
}

.skill-group li {
    font-size: 0.95rem;
    color: var(--text);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

.skill-group li:last-child {
    border-bottom: none;
}

/* ==========================================
   COMMUNITY
   ========================================== */
#community {
    background: var(--bg-alt);
}

.community-intro {
    max-width: 640px;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.role-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.15s;
}

.role-card:hover {
    border-color: var(--coffee-light);
    transform: translateY(-2px);
}

.role-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--coffee);
    margin-bottom: 0.65rem;
}

.role-card p {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.65;
}

.contact-block {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.contact-intro {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.25rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-links a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--coffee);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-links a:hover {
    color: var(--coffee-dark);
    text-decoration: underline;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: var(--espresso);
    color: rgba(250, 246, 240, 0.7);
    text-align: center;
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 640px) {
    .main-nav {
        padding: 1rem 1.25rem;
    }

    .main-nav ul {
        gap: 1.25rem;
    }

    #hero {
        padding: 5rem 1.25rem;
        min-height: 80vh;
    }

    section {
        padding: 4rem 1.25rem;
    }

    .tab-contents {
        padding: 1.5rem;
    }

    .tab-content.active {
        grid-template-columns: 1fr;
    }

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