/* =========================================================================
   Antonio Rungo — CV / personal site
   Design: "Clean Professional" — calm, credible, data-literate.
   Accent teal #16617a carried over from the original CV.
   ========================================================================= */

:root {
  --accent:        #16617a;
  --accent-2:      #23a0ab;
  --accent-soft:   #e7f1f4;
  --ink:           #16202b;
  --body:          #475569;
  --muted:         #8595a4;
  --bg:            #f4f4f2;
  --bg-alt:        #eeeeec;
  --card:          #ffffff;
  --line:          #e3e3df;
  --shadow:        0 1px 2px rgba(16, 38, 52, .04), 0 8px 24px rgba(16, 38, 52, .06);
  --shadow-hover:  0 2px 6px rgba(16, 38, 52, .08), 0 16px 40px rgba(16, 38, 52, .12);
  --radius:        14px;
  --maxw:          960px;
  --font:          "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:          ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
}

/* Light by default — dark only when the user explicitly opts in via toggle.
   (No prefers-color-scheme auto-switch, to match antoniorungo.com.) */
:root[data-theme="dark"] {
  --accent:      #4bc2d4;
  --accent-2:    #2a93a3;
  --accent-soft: #12303a;
  --ink:         #eef4f7;
  --body:        #aebccc;
  --muted:       #71849a;
  --bg:          #0d141b;
  --bg-alt:      #111b24;
  --card:        #141f29;
  --line:        #233241;
  --shadow:      0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-hover:0 2px 6px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }

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

/* eyebrow label — small monospace signal, nods to his data work */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ----------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--ink); letter-spacing: -.01em;
}
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-size: .82rem; font-weight: 700; letter-spacing: .02em;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--body); font-size: .93rem; font-weight: 500;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-cta {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px !important; color: var(--ink) !important; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle {
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  width: 38px; height: 38px; border-radius: 999px; color: var(--body);
  display: grid; place-items: center; font-size: 1rem; transition: .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } }

/* ----------------------------------------------------------------- hero */
.hero { padding: 84px 0 60px; }
.hero-grid {
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 800;
  letter-spacing: -.025em; margin-bottom: .5rem;
}
.hero .role {
  font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 600; color: var(--accent);
  margin-bottom: 1.1rem;
}
.hero .lead { font-size: 1.12rem; max-width: 38ch; }
.hero .lead strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); text-decoration: none; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.hero-photo { justify-self: center; position: relative; }
.hero-photo img {
  width: 230px; height: 230px; border-radius: 50%; object-fit: cover;
  border: 5px solid var(--card); box-shadow: var(--shadow-hover);
}
.hero-photo::after {
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 2px dashed var(--accent-2); opacity: .45; z-index: -1;
}
.status {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem;
  font-size: .9rem; color: var(--body);
  background: var(--accent-soft); padding: 6px 14px; border-radius: 999px;
}
.status .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px color-mix(in srgb, #22c55e 25%, transparent);
}

/* stat strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--line);
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat .lbl { font-size: .85rem; color: var(--muted); }

/* ----------------------------------------------------------------- sections */
section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.section-head p { margin: .6rem 0 0; max-width: 60ch; }

/* timeline */
.timeline { position: relative; margin-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 32px 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  transition: background .2s, transform .2s;
}
.tl-item:hover::before { background: var(--accent); transform: scale(1.15); }
.tl-when { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .04em; }
.tl-title { font-size: 1.12rem; font-weight: 700; margin: .15rem 0 .1rem; }
.tl-org { color: var(--body); font-weight: 500; }
.tl-org a { font-weight: 600; }
.tl-desc { margin: .5rem 0 0; font-size: .98rem; }

/* cards grid */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card .yr { font-family: var(--mono); font-size: .76rem; color: var(--accent); letter-spacing: .04em; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin: .35rem 0 .2rem; }
.card .who { font-size: .9rem; color: var(--muted); margin-bottom: .7rem; }
.card p { font-size: .94rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 14px; }
.tag {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .03em;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
}

/* skills */
.skill-group { margin-bottom: 26px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group h3 {
  font-size: .82rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.skill-group.feature h3 { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 15px;
  font-size: .92rem; font-weight: 500; color: var(--ink); background: var(--card);
  transition: border-color .2s, transform .15s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.skill-group.feature .chip {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft); color: var(--accent);
}

/* education inline list */
.edu-list { display: grid; gap: 16px; }
.edu {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px dashed var(--line);
}
.edu:last-child { border-bottom: 0; padding-bottom: 0; }
.edu .deg { font-weight: 700; color: var(--ink); }
.edu .inst { color: var(--body); font-size: .95rem; }
.edu .yr { font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* contact */
.contact-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: 20px; padding: 48px 40px; text-align: center;
  box-shadow: var(--shadow-hover);
}
.contact-card h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.contact-card p { color: rgba(255,255,255,.9); max-width: 46ch; margin: .8rem auto 1.8rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-card .btn-primary { background: #fff; color: var(--accent); }
.contact-card .btn-ghost { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.contact-card .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
.socials { display: flex; gap: 18px; justify-content: center; margin-top: 22px; }
.socials a { color: rgba(255,255,255,.9); font-size: 1.25rem; }
.socials a:hover { color: #fff; }

/* footer */
.footer {
  border-top: 1px solid var(--line); padding: 28px 0; text-align: center;
  color: var(--muted); font-size: .88rem;
}
.footer a { color: var(--body); }

/* responsive */
@media (max-width: 760px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero .lead { max-width: none; }
  .cta-row, .eyebrow { justify-content: center; }
  .hero-photo { order: -1; }
  .hero-photo img { width: 170px; height: 170px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
