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

:root {
    --bg: #0d0d0d;
    --bg-section: #111111;
    --text: #e8e8e8;
    --text-muted: #888888;
    --accent: #c8ff00;
    --accent-dim: rgba(200, 255, 0, 0.12);
    --border: rgba(255, 255, 255, 0.08);
    --img-overlay: rgba(0, 0, 0, 0.45);
    --img-filter: brightness(0.65) grayscale(15%);
    --img-filter-hover: brightness(0.82) grayscale(0%);
    --sidebar-bg: #0d0d0d;
    --font-sans: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --sidebar-w: 160px;
    --transition: 0.25s ease;
}

/* Light mode overrides */
[data-theme="light"] {
    --bg: #f5f5f0;
    --bg-section: #eeede8;
    --text: #111111;
    --text-muted: #555555;
    --accent: #5a7a00;
    --accent-dim: rgba(90, 122, 0, 0.1);
    --border: rgba(0, 0, 0, 0.12);
    --img-overlay: rgba(245, 245, 240, 0.3);
    --img-filter: brightness(0.88) grayscale(10%);
    --img-filter-hover: brightness(1) grayscale(0%);
    --sidebar-bg: #f5f5f0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

strong {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   LEFT SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.5rem 1.5rem;
    border-right: 1px solid var(--border);
    background: var(--bg);
    z-index: 100;
    transition: background var(--transition), border-color var(--transition);
}

.sidebar-social {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.sidebar-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: lowercase;
    transition: color var(--transition);
}

.sidebar-link:hover {
    color: var(--accent);
}

.sidebar-cta {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}

.get-in-touch {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    border: 1px solid var(--accent);
    padding: 0.75rem 0.4rem;
    transition: background var(--transition), color var(--transition);
}

.get-in-touch:hover {
    background: var(--accent);
    color: #000;
}

/* Theme toggle button in sidebar */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    line-height: 1;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-w);
    padding: 0 5vw 0 4vw;
    max-width: 1100px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0 4rem;
    border-bottom: 1px solid var(--border);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-heading {
    font-family: var(--font-sans);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 3.5rem;
    color: var(--text);
}

.hero-heading .typewriter {
    color: var(--accent);
}

.cursor {
    display: inline-block;
    color: var(--accent);
    animation: blink 0.9s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Section Nav (horizontal pill row) */
.section-nav {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    width: fit-content;
}

.nav-item {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    padding: 0.65rem 1.4rem;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.nav-item:last-child {
    border-right: none;
}

.nav-item:hover,
.nav-item.active {
    background: var(--accent);
    color: #000;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 200px;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image-wrap {
    position: sticky;
    top: 2rem;
    isolation: isolate;
}
.about-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--img-overlay);
    pointer-events: none;
    transition: background var(--transition);
}

.about-image-wrap:hover::after {
    background: transparent;
}

.about-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top;
    filter: var(--img-filter);
    border: 1px solid var(--border);
    display: block;
    transition: filter 0.4s ease;
}

.about-img:hover {
    filter: var(--img-filter-hover);
}

.about-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.8;
}

.about-text p strong {
    color: var(--accent);
}

/* ============================================
   EXPERIENCE
   ============================================ */
.exp-item {
    padding: 2.5rem 0;
}

.exp-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.exp-role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.exp-company {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

.exp-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.exp-bullets li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.exp-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.exp-divider {
    height: 1px;
    background: var(--border);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

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

.skill-pill {
    position: relative;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    cursor: default;
    overflow: hidden;
    transition: border-color var(--transition);
}

.skill-pill:hover {
    border-color: var(--accent);
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text);
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 0.5rem;
}

.skill-bar-wrap {
    height: 2px;
    background: var(--border);
    width: 100%;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-pill:hover .skill-bar {
    width: var(--bar-width, 0%);
}

.skill-pct {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
    display: block;
    margin-top: 0.35rem;
}

.skill-pill:hover .skill-pct {
    opacity: 1;
}

/* ============================================
   PROJECTS
   ============================================ */
.project-item {
    padding: 2.5rem 0;
}

.project-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.project-link:hover {
    opacity: 0.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-transform: uppercase;
}

.project-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 720px;
}

.project-divider {
    height: 1px;
    background: var(--border);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-section {
    border-bottom: none;
}

.contact-tagline {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3rem;
    max-width: 500px;
    line-height: 1.3;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    min-width: 80px;
}

.contact-value {
    font-size: 1rem;
    color: var(--text);
    transition: color var(--transition);
}

a.contact-value:hover {
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 560px;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    outline: none;
    resize: vertical;
    transition: border-color var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
}

.submit-btn {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.85rem 2.5rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.submit-btn:hover {
    background: var(--accent);
    color: #000;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.site-footer p {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        display: none;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 0 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image-wrap {
        position: static;
        max-width: 260px;
    }
}

@media (max-width: 600px) {
    .hero-heading {
        font-size: 2.2rem;
    }

    .section-nav {
        width: 100%;
    }

    .nav-item {
        flex: 1;
        text-align: center;
        padding: 0.6rem 0.5rem;
        font-size: 0.6rem;
    }

    .exp-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .project-header {
        flex-direction: column;
    }

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