/* Govind Lokam — editorial engineering portfolio
   Static-first: HTML + CSS + small vanilla JavaScript. */

:root {
  color-scheme: light;
  --bg: #f4efe6;
  --surface: #ebe5da;
  --surface-strong: #e2dbce;
  --text: #292720;
  --muted: #706c62;
  --rule: #d5cdbf;
  --accent: #68745c;
  --accent-strong: #4f5d45;
  --tag-bg: #e8e2d7;
  --header-bg: rgba(244, 239, 230, .94);
  --shadow: rgba(37, 32, 24, .06);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1d1b19;
  --surface: #24221f;
  --surface-strong: #2b2925;
  --text: #f0ede6;
  --muted: #aaa49a;
  --rule: #3a3731;
  --accent: #a8b296;
  --accent-strong: #c0c9ad;
  --tag-bg: #2a2824;
  --header-bg: rgba(29, 27, 25, .94);
  --shadow: rgba(0, 0, 0, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color .28s ease, color .28s ease;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .18s ease, text-decoration-color .18s ease, opacity .18s ease; }
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--bg); }

.container { width: min(100% - 3rem, 1080px); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; padding: .6rem 1rem; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color .28s ease, border-color .28s ease;
}
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.brand-name {
  justify-self: start;
  color: var(--text);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 1.03rem;
  font-weight: 760;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.header-inner nav {
  justify-self: center;
}
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.75rem, 2.2vw, 1.8rem); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .69rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .55em; }
.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
}
.theme-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--muted); padding: .42rem .75rem; cursor: pointer; font-size: .72rem; transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease; }
.theme-btn:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
.theme-btn:active { transform: scale(.97); }
.toggle-icon { color: var(--accent); font-size: .95rem; line-height: 1; }

.page-hero { padding: clamp(5rem, 13vw, 9.5rem) 0 clamp(4rem, 8vw, 6rem); max-width: 900px; }
.eyebrow, .section-label, .meta-label { margin: 0 0 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; line-height: 1.5; }
h1, h2, h3, .display-title { font-family: var(--sans); letter-spacing: -.055em; line-height: 1.08; }
.page-hero h1 { max-width: 850px; margin: 0; font-size: clamp(2.65rem, 7vw, 5.8rem); font-weight: 760; }
.page-hero h1 span { color: var(--accent); }
.hero-role { margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(.85rem, 1.6vw, 1rem); line-height: 1.8; }
.hero-summary { max-width: 720px; margin: 1.6rem 0 0; color: var(--muted); font-size: clamp(.92rem, 1.7vw, 1.08rem); line-height: 1.9; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.4rem; margin-top: 2rem; font-size: .78rem; }
.hero-links a { color: var(--text); text-decoration-color: var(--rule); }
.avail-text { color: var(--muted); font-size: .75rem; }
.avail-dot { display: inline-block; width: 7px; height: 7px; margin-right: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--rule); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 720; }
.section-heading a { color: var(--muted); text-transform: uppercase; font-size: .68rem; letter-spacing: .1em; text-decoration: none; white-space: nowrap; }
.section-heading a:hover { color: var(--accent); }
.section-intro { max-width: 650px; margin: -1rem 0 2rem; color: var(--muted); }

.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.featured-card { min-height: 285px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--rule); background: var(--surface); text-decoration: none; box-shadow: 0 8px 28px var(--shadow); transition: transform .22s ease, border-color .22s ease, background-color .28s ease, box-shadow .22s ease; }
.featured-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); box-shadow: 0 14px 34px var(--shadow); }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.card-title { margin: 2.5rem 0 .8rem; font-family: var(--sans); font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.12; letter-spacing: -.05em; font-weight: 730; }
.card-copy { max-width: 490px; margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.8; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; color: var(--muted); font-size: .68rem; }
.card-arrow { color: var(--accent); font-size: 1.2rem; transition: transform .2s ease; }
.featured-card:hover .card-arrow { transform: translate(3px, -3px); }

.project-entry { padding: 2.5rem 0; border-bottom: 1px solid var(--rule); }
.project-entry:first-child { padding-top: 0; }
.project-entry:last-child { border-bottom: 0; }
.project-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .6rem 1.5rem; }
.project-name { margin: 0; font-family: var(--sans); font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 730; letter-spacing: -.05em; line-height: 1.2; }
.project-name a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: .2em; }
.project-gh { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: none; }
.project-desc { max-width: 760px; margin: 1rem 0 1.2rem; color: var(--muted); }
.project-points, .exp-bullets { max-width: 800px; display: flex; flex-direction: column; gap: .55rem; list-style: none; margin: 1.2rem 0; padding: 0; }
.project-points li, .exp-bullets li { position: relative; padding-left: 1.25rem; color: var(--muted); font-size: .86rem; line-height: 1.85; }
.project-points li::before, .exp-bullets li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.project-points strong, .exp-bullets strong { color: var(--text); }
.project-section { margin-top: 1.25rem; }
.project-subheading {
  margin: 0 0 .35rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.project-text {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.85;
}
.project-media {
  margin: 1.5rem 0;
  max-width: 760px;
}
.project-media img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.project-media figcaption {
  margin-top: .5rem;
  font-size: .72rem;
  color: var(--muted);
}
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 1.3rem 0 0; padding: 0; }
.tag-row li, .skills-group ul li { padding: .28rem .58rem; border: 1px solid var(--rule); border-radius: 2px; background: var(--tag-bg); color: var(--muted); font-size: .7rem; line-height: 1.5; }

.page-heading { padding: clamp(4rem, 9vw, 7rem) 0 2.5rem; border-bottom: 1px solid var(--rule); }
.page-heading h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 750; }
.page-heading p { max-width: 680px; margin: 1rem 0 0; color: var(--muted); }
.exp-entry { margin-bottom: 2.5rem; }
.exp-entry:last-child { margin-bottom: 0; }
.exp-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; }
.exp-role { margin: 0; font-family: var(--sans); font-size: 1.3rem; font-weight: 700; letter-spacing: -.035em; }
.exp-date, .exp-place { color: var(--muted); font-size: .78rem; }
.exp-place { margin: .3rem 0 .8rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.skills-group { margin-bottom: 2.5rem; }
.skills-group:last-child { margin-bottom: 0; }
.skills-group-label { margin: 0 0 .9rem; color: var(--accent); font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.skills-group ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }

.contact-list { max-width: 720px; display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.cl-label { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.contact-icon { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.contact-list a { overflow-wrap: anywhere; }
.todo-note { color: var(--muted); font-size: .85rem; }

.site-footer { margin-top: auto; border-top: 1px solid var(--rule); padding: 1.5rem 0; color: var(--muted); font-size: .7rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--muted); text-decoration: none; }

@media (max-width: 760px) {
  .header-inner { display: flex; min-height: auto; padding: .9rem 0; flex-wrap: wrap; gap: .8rem 1rem; }
  .header-inner nav { order: 3; width: 100%; overflow-x: auto; padding: .15rem 0 .25rem; justify-self: auto; }
  .nav-links { width: max-content; flex-wrap: nowrap; gap: 1.2rem; }
  .nav-links a { font-size: .65rem; }
  .nav-right { margin-left: auto; justify-self: auto; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card { min-height: 240px; }
}
@media (max-width: 480px) {
  .container { width: min(100% - 2rem, 1080px); }
  body { font-size: 14px; }
  .page-hero { padding-top: 4.5rem; }
  .contact-list li { grid-template-columns: 1fr; gap: .25rem; }
  .section-heading { align-items: flex-end; }
  .section-heading a { font-size: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
