/* ============================================================
   Karun Bourishetty — resume site
   Modern dark theme, no framework dependencies
   ============================================================ */

:root {
    --bg: #0b1220;
    --bg-raised: #111a2e;
    --bg-card: #14203a;
    --border: #22314f;
    --text: #d7e0f0;
    --text-muted: #8ea0bf;
    --heading: #f2f6fc;
    --accent: #4fd1c5;
    --accent-soft: rgba(79, 209, 197, 0.12);
    --shadow: 0 10px 30px rgba(2, 8, 20, 0.45);
    --radius: 12px;
    --nav-height: 64px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: var(--font);
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(79, 209, 197, 0.08), transparent 60%),
        radial-gradient(700px 400px at -10% 30%, rgba(99, 102, 241, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: min(960px, 100% - 3rem);
    margin-inline: auto;
}

.accent { color: var(--accent); }

/* ---------- Accessibility ---------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #06281f;
    padding: 0.6rem 1rem;
    border-radius: 0 0 8px 0;
    z-index: 200;
    font-weight: 600;
}

.skip-link:focus { left: 0; }

/* ---------- Navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(11, 18, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    width: min(960px, 100% - 3rem);
    margin-inline: auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--heading);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--heading);
    background: var(--accent-soft);
}

.nav-menu a.active {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
    padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 6rem);
}

.hero-kicker {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.hero-name {
    color: var(--heading);
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-tagline {
    color: var(--text-muted);
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 600;
    margin-top: 0.5rem;
}

.hero-summary {
    max-width: 42rem;
    margin-top: 1.25rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.socials {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.socials a {
    display: inline-flex;
    padding: 0.55rem;
    color: var(--text-muted);
    border-radius: 10px;
    transition: color 0.2s, background-color 0.2s, transform 0.15s;
}

.socials a:hover,
.socials a:focus-visible {
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s, background-color 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--accent);
    color: #06281f;
}

.btn-primary:hover { background: #6fdcd2; }

.btn-ghost {
    color: var(--accent);
    border: 1px solid var(--accent);
    background: transparent;
}

.btn-ghost:hover { background: var(--accent-soft); }

.btn-lg {
    padding: 0.9rem 1.8rem;
    font-size: 1.05rem;
}

/* ---------- Sections ---------- */

.section {
    padding: clamp(3rem, 8vh, 5rem) 0;
}

.section-title {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--heading);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.75rem;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 0.75rem;
}

.section-index {
    color: var(--accent);
    font-size: 0.85em;
    font-weight: 600;
}

.section-lead {
    max-width: 46rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ---------- Cards ---------- */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 209, 197, 0.45);
}

.card h3 {
    color: var(--heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-sub {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card-meta {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* ---------- Experience timeline ---------- */

.timeline {
    list-style: none;
    position: relative;
    padding-left: 1.75rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

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

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

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 26px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
}

.timeline-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.timeline-badge {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(79, 209, 197, 0.25);
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-company {
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.15rem;
}

.timeline-dates {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.timeline-points {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
    display: grid;
    gap: 0.5rem;
}

.timeline-points li::marker { color: var(--accent); }

/* ---------- Skills ---------- */

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag-list li {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(79, 209, 197, 0.25);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- Contact & footer ---------- */

.contact { text-align: center; }

.contact .section-title { justify-content: center; }

.contact .section-title::after { display: none; }

.contact .section-lead {
    margin-inline: auto;
    margin-bottom: 2rem;
}

.contact-meta {
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.contact-links {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.contact-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-links a:hover { text-decoration: underline; }

.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

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

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg-raised);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1rem 1rem;
        display: none;
    }

    .nav-menu.open { display: flex; }

    .nav-menu a { padding: 0.85rem 1rem; }

    .timeline { padding-left: 1.4rem; }
    .timeline-item::before { left: -1.4rem; }
}

/* ---------- Print ---------- */

@media print {
    body { background: #fff; color: #111; }
    .nav, .hero-actions, .skip-link, .footer { display: none; }
    .card { box-shadow: none; border-color: #ccc; }
    .reveal { opacity: 1; transform: none; }
    :root {
        --bg-card: #fff;
        --heading: #111;
        --text: #111;
        --text-muted: #444;
        --accent: #00695c;
        --border: #ccc;
    }
}
