/* ==========================================================================
   Arnav Gupta — Portfolio  ·  modern dark / techy theme
   ========================================================================== */

:root {
    --bg:        #0b0f17;
    --bg-2:      #0e131d;
    --surface:   #131826;
    --surface-2: #171d2c;
    --border:    #222b3d;
    --border-2:  #2c374d;
    --text:      #e6edf3;
    --muted:     #8b96a8;
    --muted-2:   #6b7689;
    --accent:    #2dd4bf;
    --accent-2:  #5eead4;
    --violet:    #a78bfa;
    --gradient:  linear-gradient(135deg, #2dd4bf 0%, #a78bfa 100%);

    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --maxw: 960px;
    --radius: 14px;
    --shadow: 0 18px 40px -20px rgba(0,0,0,.7);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-mono); font-size: .9rem; font-weight: 500;
    padding: 12px 22px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--gradient); color: #07120f; font-weight: 500; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(45,212,191,.55); color: #07120f; }

/* ---------- nav ---------- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(11,15,23,.65); backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .3s ease, background .3s ease;
}
.site-nav.scrolled { border-bottom-color: var(--border); background: rgba(11,15,23,.85); }
.nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.nav-logo span { color: var(--text); margin-left: 5px; }
.nav-logo:hover { color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
    font-family: var(--font-mono); font-size: .82rem; color: var(--muted);
    padding: 8px 12px; border-radius: 8px; transition: color .2s ease, background .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-links a.nav-cta { color: var(--accent); }
.nav-links a.nav-cta:hover { color: #07120f; background: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding: 120px 0 80px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(620px circle at 18% 22%, rgba(45,212,191,.16), transparent 60%),
        radial-gradient(560px circle at 82% 78%, rgba(167,139,250,.14), transparent 60%);
}
.hero-bg::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
}
.hero-inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: center;
}
.hero-text { min-width: 0; }
.hero-photo { justify-self: center; position: relative; }
.hero-photo img {
    position: relative; z-index: 1; display: block;
    width: clamp(200px, 26vw, 300px); aspect-ratio: 1;
    object-fit: cover; object-position: top; border-radius: 50%;
    border: 1px solid var(--border-2); box-shadow: 0 22px 50px -18px rgba(0,0,0,.8);
}
.hero-eyebrow { font-family: var(--font-mono); font-size: .9rem; color: var(--accent); margin: 0 0 18px; letter-spacing: .02em; }
.hero-eyebrow i { margin-right: 6px; }
.hero-name {
    font-size: clamp(2.8rem, 8vw, 5.2rem); font-weight: 700; letter-spacing: -.03em; margin: 0;
    background: var(--gradient); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent; width: fit-content;
}
.hero-tagline { font-size: clamp(1.25rem, 3.4vw, 2rem); color: var(--text); font-weight: 500; margin: 10px 0 22px; letter-spacing: -.01em; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 0 34px; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ---------- social ---------- */
.social-list { list-style: none; display: flex; gap: 12px; margin: 0; padding: 0; }
.social-list a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--border-2); color: var(--muted); font-size: 1.05rem;
    transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}
.social-list a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); background: var(--surface); }

/* ---------- sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 44px; }
.section-num { font-family: var(--font-mono); font-size: 1rem; color: var(--accent); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; position: relative; }
.section-title::after {
    content: ""; display: block; width: 54px; height: 3px; margin-top: 12px;
    background: var(--gradient); border-radius: 3px;
}

/* ---------- about ---------- */
.about-body { max-width: 760px; }
.about-body p { color: var(--muted); font-size: 1.08rem; margin: 0 0 20px; }
.about-body p:last-child { margin-bottom: 0; }

/* ---------- experience timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
    background: linear-gradient(var(--border-2), transparent);
}
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-dot {
    position: absolute; left: -28px; top: 24px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 4px rgba(45,212,191,.15);
}
.timeline-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 26px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.timeline-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.timeline-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.timeline-role { font-size: 1.18rem; }
.timeline-period { font-family: var(--font-mono); font-size: .82rem; color: var(--muted-2); white-space: nowrap; }
.timeline-meta { margin: 4px 0 0; font-size: .95rem; color: var(--muted); }
.timeline-company { color: var(--accent); font-weight: 500; }
.timeline-desc { margin: 12px 0 0; color: var(--muted); font-size: 1rem; }

.exp-details { margin-top: 12px; }
.exp-details > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: .78rem; color: var(--accent);
    letter-spacing: .03em; transition: color .2s ease; width: fit-content;
}
.exp-details > summary::-webkit-details-marker { display: none; }
.exp-details > summary:hover { color: var(--accent-2); }
.exp-details > summary .fa { font-size: .68rem; transition: transform .25s ease; }
.exp-details[open] > summary .fa { transform: rotate(180deg); }

/* ---------- projects ---------- */
.project-group { margin-bottom: 44px; }
.project-group:last-child { margin-bottom: 0; }
.group-title { font-family: var(--font-mono); font-size: .95rem; color: var(--violet); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 20px; font-weight: 500; }
.project-grid { display: flex; flex-direction: column; gap: 18px; }
.project-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 26px; display: flex; flex-direction: column;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-title { font-size: 1.1rem; line-height: 1.3; }
.project-link { color: var(--muted); font-size: 1.25rem; flex-shrink: 0; }
.project-link:hover { color: var(--accent); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 16px; padding: 0; }
.tag-list li { font-family: var(--font-mono); font-size: .72rem; color: var(--accent-2); background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.22); padding: 3px 10px; border-radius: 6px; }
.project-desc { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- publications ---------- */
.pub-intro { color: var(--muted); margin: 0 0 30px; }
.pub-list { list-style: none; margin: 0 0 30px; padding: 0; }
.pub-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.pub-item:first-child { padding-top: 0; }
.pub-authors { margin: 0 0 5px; color: var(--muted); font-size: .92rem; }
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-title { display: inline-block; font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.pub-title:hover { color: var(--accent); }
.pub-venue { margin: 0; font-size: .88rem; color: var(--muted-2); font-style: italic; }
.pub-cites { font-style: normal; font-family: var(--font-mono); color: var(--accent); font-size: .8rem; }
.pub-note { color: var(--muted-2); font-size: .9rem; font-style: italic; margin: 0; }

/* ---------- education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: transform .2s ease, border-color .2s ease; }
.edu-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.edu-period { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.edu-school { font-size: 1.15rem; margin: 8px 0 6px; }
.edu-degree { margin: 0 0 6px; color: var(--text); font-size: .98rem; }
.edu-meta { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- skills ---------- */
.skills-grid { display: flex; flex-direction: column; }
.skill-group {
    display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start;
    padding: 20px 0; border-bottom: 1px solid var(--border);
}
.skill-group:first-child { padding-top: 0; }
.skill-group:last-child { border-bottom: 0; padding-bottom: 0; }
.skill-cat { font-family: var(--font-mono); font-size: .85rem; color: var(--violet); text-transform: uppercase; letter-spacing: .05em; margin: 0; padding-top: 6px; font-weight: 500; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip-list li { font-size: .85rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-2); padding: 5px 12px; border-radius: 8px; transition: border-color .2s ease, color .2s ease; }
.chip-list li:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 600px) {
    .skill-group { grid-template-columns: 1fr; gap: 12px; }
    .skill-cat { padding-top: 0; }
}

/* ---------- contact ---------- */
.section-contact { padding-bottom: 120px; }
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-prompt { font-size: 1.15rem; color: var(--text); margin: 0 0 22px; }
.contact-email { font-family: var(--font-mono); font-size: 1.05rem; display: inline-block; margin-bottom: 22px; }
.contact-intro .social-list { margin-top: 6px; }

.contact-form .field, .contact-form .field-row { margin-bottom: 14px; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form textarea {
    width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
    padding: 13px 16px; color: var(--text); font-family: var(--font-body); font-size: .95rem; resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,212,191,.12); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: var(--muted-2); font-family: var(--font-mono); font-size: .85rem; }
.footer-inner .social-list a { width: 36px; height: 36px; font-size: .95rem; }
.footer-top { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }
.footer-top:hover { color: var(--accent); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
    .contact-wrap { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
    .nav-toggle { display: flex; z-index: 110; }
    .nav-links {
        position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
        flex-direction: column; align-items: flex-start; gap: 4px;
        background: var(--surface); border-left: 1px solid var(--border);
        padding: 96px 28px 28px; transform: translateX(100%);
        transition: transform .35s cubic-bezier(.4,0,.2,1);
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links a { width: 100%; font-size: 1rem; padding: 12px 14px; }
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 32px; }
    .hero { padding: 110px 0 70px; min-height: auto; }
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero-photo { order: -1; }
    .hero-photo img { width: clamp(150px, 42vw, 200px); }
    .hero-actions { gap: 18px; }
    .timeline-top { gap: 4px; }
    .field-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 460px) {
    .container { padding: 0 18px; }
    .project-grid, .edu-grid, .skills-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
