/* =================================================================
   Poorna Chandra Raju — Portfolio
   Clean technical / minimal. Zero external requests (system fonts).

   Theme follows the OS automatically (prefers-color-scheme) — no toggle.
   All colors are CSS variables defined once below. To re-theme the whole
   site, change the values in :root (light) and the dark-mode media query.
   ================================================================= */

/* ---- Design tokens: LIGHT (default) ---- */
:root {
  --bg:            #ffffff;
  --surface:       #fafafa;
  --text:          #1a1a1a;
  --text-2:        #565656;
  --text-muted:    #8a8a8a;
  --accent:        #1a3a5c;   /* navy, from the résumé header */
  --accent-2:      #2f6699;   /* brighter navy for links */
  --accent-bg:     #eaf1f8;   /* faint navy tint for tags/highlight */
  --border:        #e6e6e6;
  --border-strong: #cfcfcf;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
               "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --maxw: 760px;
  --radius: 8px;
}

/* ---- Design tokens: DARK ----
   Applied automatically when the operating system is set to dark mode. ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f1419;
    --surface:       #161c24;
    --text:          #e8ecf0;
    --text-2:        #a4adb8;
    --text-muted:    #6f7885;
    --accent:        #6ba3d6;
    --accent-2:      #8bbce6;
    --accent-bg:     #1a2735;
    --border:        #262d38;
    --border-strong: #38414f;
  }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; }

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

/* Inline SVG icons: stroke-based, inherit size via width/height. */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.nav__brand:hover { text-decoration: none; color: var(--text); }
.nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.nav__brand:hover .nav__dot { background: var(--accent-2); }

.nav__links { display: flex; gap: 24px; }
.nav__links a {
  position: relative;
  color: var(--text-2);
  font-size: 14px;
  padding: 4px 1px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .nav__links a::after { transition: none; }
}
@media (max-width: 680px) {
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 13px; }
}
@media (max-width: 600px) {
  /* Single-scroll page — drop the in-page links, keep the name + toggle. */
  .nav__links { display: none; }
  .nav__brand { font-size: 14px; }
}

/* ---- Hero ---- */
.hero { padding: 80px 24px 56px; }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 16px;
}
.hero__name {
  font-size: clamp(34px, 7vw, 48px);
  letter-spacing: -0.5px;
  margin: 0 0 18px;
}
.hero__tagline {
  font-size: 18px;
  color: var(--text-2);
  margin: 0 0 26px;
  max-width: 600px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--text-2);
}
.hero__meta > span,
.hero__meta > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero__meta a { color: var(--text-2); }
.hero__meta a:hover { color: var(--accent-2); text-decoration: none; }
.hero__meta a:hover .ico { stroke: var(--accent-2); }

/* ---- Sections ---- */
.section {
  padding: 44px 24px;
  border-top: 1px solid var(--border);
}
.section__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.section__intro {
  color: var(--text-2);
  margin: -8px 0 28px;
  font-size: 15px;
}
.prose p { margin: 0 0 18px; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* ---- Skills ---- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.skill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.skill h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent);
  margin: 0 0 8px;
  font-weight: 600;
}
.skill p { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---- Projects timeline ---- */
.timeline { display: flex; flex-direction: column; gap: 28px; }
.project {
  border-left: 2px solid var(--border-strong);
  padding-left: 22px;
}
.project--highlight { border-left-color: var(--accent); }
.project__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 10px;
}
.project__head h3 { font-size: 18px; margin: 0; }
.project__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.project ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 15px;
}
.project li { margin-bottom: 6px; }
.project li:last-child { margin-bottom: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 3px 9px;
  border-radius: 6px;
}

/* ---- Education ---- */
.edu { display: flex; flex-direction: column; }
.edu__item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.edu__item:first-child { padding-top: 0; }
.edu__item:last-child { border-bottom: 0; padding-bottom: 0; }
.edu__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}
.edu__head h3 { font-size: 16px; margin: 0; }
.edu__year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.edu__inst { margin: 5px 0 0; color: var(--text-2); font-size: 15px; }
.edu__board {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 48px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer p { margin: 0; }

