/* Nick Furlo — personal site. Dark theme, olive accent. */
:root {
  --bg: #0c0e0b;
  --surface: #14170f;
  --surface-2: #1b1f15;
  --line: #2a3022;
  --text: #e9ebe2;
  --muted: #a3a998;          /* 7.9:1 on --bg */
  --accent: #a9b95a;         /* olive, 9:1 on --bg */
  --accent-strong: #c2d36b;
  --accent-ink: #12150a;     /* text on accent fills */
  --accent-soft: rgba(169, 185, 90, .12);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --max: 68rem;
  --header-h: 4rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--accent-ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(12, 14, 11, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--accent); }
.site-nav ul { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .4rem 0; }
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--text); }
.site-nav a[aria-current="true"] { box-shadow: 0 2px 0 var(--accent); }
.site-nav .nav-cta {
  color: var(--accent-ink); background: var(--accent); padding: .45rem 1rem; border-radius: 999px; font-weight: 600; box-shadow: none;
}
.site-nav .nav-cta:hover { background: var(--accent-strong); color: var(--accent-ink); }
.nav-toggle { display: none; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr minmax(0, 20rem); gap: clamp(2rem, 6vw, 5rem);
  align-items: center; padding-block: clamp(3rem, 10vw, 7rem) clamp(2rem, 6vw, 4rem);
}
.eyebrow { font: 500 .8rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.5rem, 7.5vw, 5rem); font-weight: 800; letter-spacing: -.035em; }
.dot { color: var(--accent); }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); max-width: 38rem; margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-actions .btn { padding-inline: 1.15rem; font-size: .95rem; }
.hero-photo { margin: 0; justify-self: end; width: 100%; }
.hero-photo img {
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 28px;
  border: 1px solid var(--line); box-shadow: 14px 14px 0 var(--accent-soft), 0 0 0 1px var(--accent-soft);
  filter: saturate(.9);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: .75rem 1.5rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line);
}
.stats li { padding: 1.5rem 1.25rem 1.5rem 0; display: flex; flex-direction: column; gap: .35rem; }
.stats li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.stats strong { font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--accent); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stats span { color: var(--muted); font-size: .9rem; line-height: 1.4; }

/* Sections */
.section { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding-block: clamp(3.5rem, 9vw, 6.5rem); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-num { font: 500 .85rem/1 var(--mono); color: var(--accent); padding-top: .9rem; margin: 0; }
.section-body { min-width: 0; }
.section h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 2rem; font-weight: 700; }
.section-intro { color: var(--muted); max-width: 44rem; margin-top: -.75rem; margin-bottom: 2rem; font-size: 1.1rem; }
.prose { max-width: 42rem; color: #cfd3c6; }
.subhead { font: 500 .8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 3.5rem 0 1.25rem; }

/* Skills */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.skill-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-size: .88rem; padding: .3rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid rgba(169, 185, 90, .25); }

/* Timeline / entries */
.timeline > li, .edu > li { display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.entry-date, .pub-date { font: 400 .85rem/1.6 var(--mono); color: var(--muted); margin: .25rem 0 0; }
.entry.current .entry-date { color: var(--accent); }
.entry.current .entry-date::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); margin-right: .5rem; vertical-align: .05em; }
.timeline h3, .edu h4 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.entry-org { color: var(--muted); margin: .3rem 0 0; }
.entry-points, .card-points { margin-top: .9rem; color: #cfd3c6; font-size: .98rem; }
.entry-points li, .card-points li { position: relative; padding-left: 1.25rem; margin-bottom: .4rem; display: block; border: 0; padding-block: 0; }
.entry-points li::before, .card-points li::before { content: ""; position: absolute; left: 0; top: .72em; width: .5rem; height: 1.5px; background: var(--accent); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.card:hover { border-color: rgba(169, 185, 90, .5); transform: translateY(-2px); }
.featured-card { grid-column: 1 / -1; border-color: rgba(169, 185, 90, .45); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 55%); padding: clamp(1.5rem, 4vw, 2.5rem); }
.featured-card h3 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.featured-card > p { max-width: 46rem; }
.featured-card .card-points { margin: .25rem 0 1.25rem; max-width: 46rem; }
.featured-card .tags { margin-top: .25rem; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; padding: .15rem .6rem; border-radius: 999px; margin-right: .5rem; }
.coming-soon { color: var(--muted); font-style: italic; }
.card-meta { font: 400 .78rem/1.5 var(--mono); color: var(--accent); margin-bottom: .75rem; }
.card h3 { font-size: 1.4rem; margin-bottom: .75rem; }
.card > p { color: #cfd3c6; font-size: .98rem; }
.card-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: auto 0 0; padding-top: 1rem; font-size: .95rem; font-weight: 500; }
.more { margin-top: 2rem; font-weight: 500; }

/* Publications */
.pubs > li { display: grid; grid-template-columns: 7rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.pubs > li:last-child { border-bottom: 1px solid var(--line); }
.pub h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }
.pub-meta { color: var(--muted); font-size: .92rem; margin: .5rem 0 0; }
.pub .card-links { padding-top: .75rem; }
.pubs > .pub.featured { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); margin-inline: -1rem; padding-inline: 1rem; border-radius: 4px; }
.awards { margin-top: .75rem; display: flex; flex-direction: column; gap: .25rem; font-weight: 500; font-size: .95rem; }

/* Contact */
.contact .btn { font-size: 1.1rem; padding-inline: 2rem; }
.links { display: flex; gap: 1.5rem; margin-top: 2rem; font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* Scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-self: start; width: min(11rem, 50%); }
  .hero-photo img { border-radius: 22px; box-shadow: 8px 8px 0 var(--accent-soft); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { grid-template-columns: 1fr; gap: .5rem; }
  .section-num { padding-top: 0; }
  .skill-grid, .card-grid { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 44rem) {
  body { font-size: 1rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .9rem;
    background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; font: 500 .9rem var(--font); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before { display: block; width: 1rem; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .nav-toggle-bars::before { content: ""; position: absolute; top: 5px; left: 0; }
  .nav-toggle-bars { margin-bottom: 5px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(3px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-5px) rotate(-90deg); top: 5px; }
  .site-nav {
    position: absolute; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem; display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li a { display: block; padding: .9rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="true"] { box-shadow: none; color: var(--accent); }
  .site-nav .nav-cta { margin-top: 1rem; text-align: center; border-bottom: 0; }
  .timeline > li, .edu > li, .pubs > li { grid-template-columns: 1fr; gap: .4rem; }
  .entry-date, .pub-date { margin-top: 0; }
  .stats li { padding-right: .75rem; }
  .stats li:nth-child(even) { padding-left: 1rem; }
  .card { padding: 1.35rem; }
  .pubs > .pub.featured { margin-inline: -.75rem; padding-inline: .75rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .nav-toggle, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
