/* Anmol Dadlani — personal site
   Palette: an Airflow console in daylight.
   fog paper / petrol ink / task-success green / running amber */

:root {
    --paper: #F2F5F3;
    --card: #FBFCFB;
    --ink: #13241F;
    --muted: #51665E;
    --line: #D6DFDA;
    --success: #177452;
    --success-soft: #E2EFE9;
    --running: #B8770A;
    --running-soft: #F6ECD9;

    --display: "Archivo", sans-serif;
    --body: "IBM Plex Sans", sans-serif;
    --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: var(--mono);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--success);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.9rem clamp(1.25rem, 5vw, 4rem);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-brand {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--ink);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
}

.nav-links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
    display: inline-block;
    padding: 0.65rem 1.2rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.btn:hover { background: var(--success); }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

.btn-ghost:hover {
    background: var(--success-soft);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--success);
}

.btn-small { padding: 0.45rem 0.9rem; font-size: 0.8125rem; }

/* ---------- hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "text photo" "dag dag";
    align-items: center;
    gap: 2rem clamp(2rem, 6vw, 5rem);
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 5vw, 4rem) 3rem;
}

.hero-inner { grid-area: text; }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--success);
    margin: 0 0 1rem;
}

.hero-name {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 1.25rem;
}

.hero-thesis {
    max-width: 38rem;
    font-size: 1.125rem;
    color: var(--muted);
    margin: 0 0 2rem;
}

.hero-thesis strong { color: var(--ink); font-weight: 600; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-photo {
    grid-area: photo;
    margin: 0;
}

.hero-photo img {
    display: block;
    width: clamp(9rem, 16vw, 13rem);
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
}

/* ---------- career DAG (signature) ---------- */

.dag {
    grid-area: dag;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
}

.dag-caption {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 1.1rem;
}

.dag-track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dag-node {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "dot task" "dot sub";
    column-gap: 0.6rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.dag-dot {
    grid-area: dot;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
    transition: background 0.4s ease;
}

.dag-task {
    grid-area: task;
    font-family: var(--mono);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.dag-sub {
    grid-area: sub;
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--muted);
    white-space: nowrap;
}

.dag-state {
    position: absolute;
    top: -0.55rem;
    right: 0.6rem;
    padding: 0 0.4rem;
    background: var(--card);
    font-family: var(--mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dag-node[data-state="success"] {
    border-color: var(--success);
    background: var(--success-soft);
}
.dag-node[data-state="success"] .dag-dot { background: var(--success); }
.dag-node[data-state="success"] .dag-state { opacity: 1; color: var(--success); }

.dag-node[data-state="running"] {
    border-color: var(--running);
    background: var(--running-soft);
}
.dag-node[data-state="running"] .dag-dot {
    background: var(--running);
    animation: pulse 1.6s ease-in-out infinite;
}
.dag-node[data-state="running"] .dag-state { opacity: 1; color: var(--running); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(184, 119, 10, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(184, 119, 10, 0); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .dag-node[data-state="running"] .dag-dot { animation: none; }
    .dag-node, .dag-dot, .dag-state { transition: none; }
}

.dag-edge {
    flex: 0 0 auto;
    display: flex;
    color: var(--muted);
}

/* ---------- sections ---------- */

.section {
    max-width: 72rem;
    margin: 0 auto;
    padding: 3.5rem clamp(1.25rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
}

.section-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    letter-spacing: -0.02em;
    margin: 0 0 2.25rem;
}

/* ---------- experience ---------- */

.job { margin-bottom: 2.75rem; }
.job:last-child { margin-bottom: 0; }

.job-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.chip {
    font-family: var(--mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}

.chip-success { color: var(--success); background: var(--success-soft); }
.chip-running { color: var(--running); background: var(--running-soft); }

.job-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.375rem;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
}

.job-points {
    margin: 0;
    padding-left: 1.2rem;
    max-width: 46rem;
}

.job-points li { margin-bottom: 0.5rem; }
.job-points li::marker { color: var(--success); }

.metric {
    font-family: var(--mono);
    font-size: 0.9375em;
    font-weight: 500;
    color: var(--success);
    white-space: nowrap;
}

/* ---------- projects ---------- */

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

.project {
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.project-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.1875rem;
    letter-spacing: -0.01em;
    margin: 0.5rem 0 0.6rem;
}

.project p {
    font-size: 0.9375rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.project-tech { margin-bottom: 0; font-size: 0.75rem; }

/* ---------- education ---------- */

.edu-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.edu-row:last-child { border-bottom: 0; }

.edu-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    margin: 0 0 0.35rem;
}

.edu-detail {
    font-size: 0.9375rem;
    color: var(--muted);
    max-width: 44rem;
    margin: 0;
}

.edu-dates { flex-shrink: 0; }

/* ---------- skills ---------- */

.skills {
    display: grid;
    gap: 1.75rem;
}

.skill-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    font-size: 0.75rem;
    margin: 0 0 0.7rem;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.skill-chips li {
    font-family: var(--mono);
    font-size: 0.8125rem;
    padding: 0.3rem 0.75rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
}

/* ---------- footer ---------- */

.footer {
    max-width: 72rem;
    margin: 0 auto;
    padding: 4rem clamp(1.25rem, 5vw, 4rem) 5rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer-cta {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.375rem, 3.5vw, 1.75rem);
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
}

.footer .hero-actions { justify-content: center; }

.footer-note { margin: 2rem 0 0; font-size: 0.75rem; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
    .nav { gap: 1rem; }
    .nav-links { display: none; }
    .nav-brand { margin-right: auto; }

    .hero {
        grid-template-columns: 1fr;
        grid-template-areas: "photo" "text" "dag";
        align-items: start;
    }

    .hero-photo img { width: 7.5rem; }

    .dag-track {
        flex-direction: column;
        align-items: stretch;
    }

    .dag-node .dag-task,
    .dag-node .dag-sub { white-space: normal; }

    .dag-edge {
        justify-content: center;
        transform: rotate(90deg);
        height: 40px;
        align-items: center;
    }

    .edu-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}
