*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
    --bg:            #0d0d0d;
    --bg-alt:        #111111;
    --surface:       #181818;
    --surface-hover: #202020;
    --border:        #272727;
    --border-subtle: #1e1e1e;

    --accent:        #B52020;
    --accent-dim:    #7a1616;
    --accent-glow:   rgba(181, 32, 32, 0.08);

    --chrome:        #787878;
    --chrome-mid:    #999999;
    --chrome-bright: #b8b8b8;

    --text:          #dedede;
    --text-muted:    #505050;

    --font-head: 'Rajdhani', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --section-pad: 6rem 2.5rem;
    --radius: 0;
    --max-w: 1020px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

a { color: inherit; }

#nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 2.5rem;
    transition: border-color 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid transparent;
}

#nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

#nav.scrolled::before {
    opacity: 1;
}

#nav.scrolled {
    border-color: var(--border);
    padding: 1rem 2.5rem;
}

.nav-logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.15em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.25rem;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--chrome-mid);
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--chrome-mid);
    transition: all 0.2s;
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

#protagonist {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 2.5rem 4rem;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

#protagonist::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 55% at 75% 50%, rgba(181, 32, 32, 0.045) 0%, transparent 65%),
        radial-gradient(ellipse 35% 50% at 10% 90%, rgba(181, 32, 32, 0.025) 0%, transparent 55%);
    pointer-events: none;
}

#protagonist::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.protagonist-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
}

.protagonist-label {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.protagonist-name {
    font-size: clamp(3.8rem, 7.5vw, 6.5rem);
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.protagonist-sub {
    color: var(--chrome);
    font-size: 0.97rem;
    line-height: 1.75;
    max-width: 440px;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.protagonist-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.protagonist-gauge {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

#gauge-svg { width: 100%; max-width: 480px; }

.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    border: 1px solid;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--chrome-mid);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--chrome);
    color: var(--text);
}

.btn--large {
    padding: 0.9rem 2.5rem;
    font-size: 0.85rem;
}

section { padding: var(--section-pad); }
#about, #projects { background: var(--bg-alt); }
#skills, #experience, #contact { background: var(--bg); }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-title {
    font-size: 1.0rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--chrome-mid);
    margin-bottom: 2.75rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 2rem;
    height: 2px;
    background: var(--accent);
}

.section-title--spaced { margin-top: 4.5rem; }

.about-text {
    font-size: 1.05rem;
    color: var(--chrome-bright);
    max-width: 700px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.about-meta {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}

.about-meta-item { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }

.meta-label {
    font-family: var(--font-head);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 80px;
    flex-shrink: 0;
}

.meta-value { color: var(--chrome-bright); font-size: 0.9rem; }

.meta-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.meta-link:hover { text-decoration: underline; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.skill-group {
    background: var(--surface);
    padding: 1.75rem;
    border-top: 2px solid var(--accent-dim);
    transition: border-color 0.2s;
}

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

.skill-group-title {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    font-weight: 600;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--chrome-mid);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-family: var(--font-head);
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
}

.tag:hover { border-color: var(--accent-dim); color: var(--chrome-bright); }

.timeline {
    position: relative;
    padding-left: 1.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0.6rem; bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -0.35rem;
    top: 0.55rem;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border: 2px solid var(--bg);
}

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

.timeline-header h3 {
    font-size: 1.15rem;
    color: var(--text);
}

.timeline-date {
    font-family: var(--font-head);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    flex-shrink: 0;
}

.timeline-org {
    font-size: 0.82rem;
    color: var(--chrome);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.timeline-list li {
    color: var(--chrome-mid);
    font-size: 0.9rem;
    padding-left: 1.25rem;
    position: relative;
    font-weight: 300;
}

.timeline-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent-dim);
}

.timeline-desc {
    color: var(--chrome-mid);
    font-size: 0.9rem;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 1.75rem;
    max-width: 680px;
}

.work-projects {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.work-project {
    background: var(--surface);
    padding: 1.25rem 1.5rem;
    border-left: 2px solid var(--accent-dim);
    transition: border-color 0.2s, background 0.2s;
}

.work-project:hover {
    border-left-color: var(--accent);
    background: var(--surface-hover);
}

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

.work-project-name {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
}

.work-project-period {
    font-family: var(--font-head);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--chrome);
    flex-shrink: 0;
}

.work-project-desc {
    color: var(--chrome-mid);
    font-size: 0.87rem;
    line-height: 1.65;
    font-weight: 300;
    margin-bottom: 0.85rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.project-card {
    background: var(--surface);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: background 0.2s;
    border-top: 2px solid transparent;
}

.project-card:hover {
    background: var(--surface-hover);
    border-top-color: var(--accent-dim);
}

.project-card--placeholder {
    border-top-color: transparent;
    background: repeating-linear-gradient(
        -45deg,
        var(--surface),
        var(--surface) 6px,
        var(--bg-alt) 6px,
        var(--bg-alt) 12px
    );
    opacity: 0.55;
}

.project-card--placeholder:hover {
    opacity: 0.75;
    border-top-color: var(--border);
}

.project-card h3 {
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.05em;
}

.project-card p {
    color: var(--chrome);
    font-size: 0.87rem;
    line-height: 1.65;
    flex-grow: 1;
    font-weight: 300;
}

.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-sub {
    color: var(--chrome-mid);
    font-size: 1rem;
    font-weight: 300;
}

.contact-phone {
    margin-top: -0.5rem;
}

.contact-phone a {
    color: var(--chrome);
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
}

.contact-phone a:hover { color: var(--text); }

footer {
    padding: 1.75rem 2.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy,
.footer-location {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .protagonist-inner {
        grid-template-columns: 1fr;
    }

    .protagonist-gauge { display: none; }

    .protagonist-name { font-size: clamp(3rem, 12vw, 4.5rem); }
}

@media (max-width: 640px) {
    :root { --section-pad: 4rem 1.5rem; }

    #nav { padding: 1rem 1.5rem; }
    #nav.scrolled { padding: 0.85rem 1.5rem; }

    .nav-links {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10,10,10,0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 199;
    }

    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.1rem; letter-spacing: 0.25em; }
    .nav-hamburger { display: flex; position: relative; z-index: 200; }

    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
