:root {
    /* Color Palette - Japandi / Earthy Minimalism */
    --bg-main: #EFE9D7;
    /* Warm Sandy Beige */
    --bg-secondary: #7B8B6F;
    /* Muted Moss Green */

    /* Text */
    --text-primary: #2C2A29;
    /* Deep charcoal */
    --text-secondary: #7A7571;
    /* Muted earthy brown/gray */

    /* Accents */
    --accent-main: #6B7A6A;
    /* Muted sage green */
    --accent-warm: #B88A7A;
    /* Soft terracotta */
    --accent-dark: #4A4A4A;

    /* Styling */
    --border-subtle: rgba(44, 42, 41, 0.1);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 0.75rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 5rem;

    /* Transitions */
    --transition-smooth: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
.logo,
em {
    font-family: var(--font-heading);
    font-weight: 400;
}

em {
    font-style: italic;
    color: var(--accent-main);
}

a {
    color: inherit;
    text-decoration: none;
}

.text-center {
    text-align: center;
}

.muted-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    display: block;
}

/* Spacing Utilities */
.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

.mt-md {
    margin-top: var(--space-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    background: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(247, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger span {
    width: 30px;
    height: 1px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0;
}

.section-container {
    width: 100%;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-xl);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    /* Slight rounding, not pill */
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    background: var(--accent-main);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Hero Section */
.hero-section {
    align-items: flex-start;
    /* Soft nature background from user upload, fading smoothly to background color at the bottom */
    background-image:
        linear-gradient(rgba(247, 245, 240, 0.1) 0%, rgba(247, 245, 240, 0.3) 60%, var(--bg-main) 100%),
        url('hero-bg.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    position: relative;
    /* Expanding negative space to fill view with image details below text */
    padding-top: 20vh;
    padding-bottom: 20vh;

    /* Full bleed out of the boxed main container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 2rem);
    padding-right: calc(50vw - 50% + 2rem);
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-primary);
    /* Darker text for legibility over background */
    margin-bottom: var(--space-xl);
    max-width: 600px;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

/* About Section */
.about-section {
    position: relative;
    background-color: var(--bg-secondary);
    /* Full bleed out of the boxed main container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 2rem);
    padding-right: calc(50vw - 50% + 2rem);
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
}

.about-section .section-title,
.about-section h3,
.about-section p,
.about-section .highlight-list li {
    color: var(--bg-main);
    /* Pop against the green */
}

.about-section .text-secondary,
.about-section p {
    color: rgba(239, 233, 215, 0.85);
    /* Slightly muted beige for body text */
}

.about-section .highlight-list li::before {
    color: var(--bg-main);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: stretch;
}

.about-text .section-title {
    margin-bottom: var(--space-md);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.highlight-list {
    list-style: none;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
}

.highlight-list li {
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.highlight-list li::before {
    content: '—';
    color: var(--accent-main);
    margin-right: 1rem;
}

.about-image {
    background: var(--bg-secondary);
    aspect-ratio: 3/4;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Projects Section */
.projects-section {
    position: relative;
    /* Clean white background to contrast with beige */
    background-color: var(--bg-main);

    /* Full bleed out of the boxed main container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 2rem);
    padding-right: calc(50vw - 50% + 2rem);
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
}

.section-desc {
    color: var(--text-secondary);
    margin-top: -3rem;
    margin-bottom: var(--space-xl);
    font-size: 1.1rem;
    text-align: center;
    font-weight: 300;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.project-card {
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-video-wrapper {
    aspect-ratio: 16/9;
    background: var(--text-primary);
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    overflow: hidden;
}

/* Ensure YouTube iframes stretch perfectly inside the wrapper */
.project-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-secondary);
    font-weight: 300;
    font-size: 1.2rem;
    background: #1a1a1a;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Skills Section */
.skills-section {
    position: relative;
    background-color: var(--bg-secondary);
    /* Full bleed out of the boxed main container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 2rem);
    padding-right: calc(50vw - 50% + 2rem);
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
}

.skills-section .section-title,
.skills-section h3 {
    color: var(--bg-main);
}

.skills-section .skill-tag {
    color: rgba(239, 233, 215, 0.9);
}

.skills-section .skill-category h3 {
    border-bottom: 1px solid rgba(239, 233, 215, 0.2);
}

.skills-section .skill-tag::before {
    background-color: var(--bg-main);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.skill-category {
    padding: 0 1rem;
}

.skill-category h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-tag {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    position: relative;
    padding-left: 1rem;
}

.skill-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent-warm);
    opacity: 0.7;
}

/* Contact Section */
.contact-section {
    position: relative;
    background-color: var(--bg-main);
    /* Full bleed out of the boxed main container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + 2rem);
    padding-right: calc(50vw - 50% + 2rem);
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
}

.contact-section .section-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 1.15rem;
    font-weight: 300;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.minimal-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.minimal-input:focus {
    outline: none;
    border-bottom-color: var(--accent-main);
}

.minimal-input::placeholder {
    color: #A09C98;
    font-weight: 300;
}

.submit-btn {
    align-self: center;
    margin-top: 1rem;
    width: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 5rem;
}

.social-icon {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-icon:hover {
    color: var(--text-primary);
}

/* Soft Animations (Japandi Style) */
.hidden-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.show-element {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-section {
        padding-top: 10rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        text-align: center;
    }

    .form-group {
        grid-template-columns: 1fr;
        gap: 0;
    }

    section {
        padding: 5rem 0;
    }
}