/* =========================================================
   Sujeeth H.R. — Portfolio
   Palette: deep petrol ink · warm paper · brass accent
   Type: Fraunces (display) · Hanken Grotesk (body) · JetBrains Mono (labels)
   ========================================================= */

:root {
  --ink:        #17262C;
  --ink-soft:   #3C4C52;
  --paper:      #F6F4EE;
  --paper-2:    #ECE8DE;
  --accent:     #B0712A;
  --accent-deep:#8C5719;
  --line:       #D9D3C5;
  --mute:       #6E797D;
  --white:      #FFFFFF;

  --max:   1120px;
  --gutter: clamp(20px, 5vw, 64px);

  --f-display: "Fraunces", Georgia, serif;
  --f-body:    "Hanken Grotesk", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }

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

/* ---------------- NAV ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--f-mono);
  font-weight: 500;
  letter-spacing: .12em;
  text-decoration: none;
  font-size: 15px;
}
.nav__brand-dot { color: var(--accent); }
.nav__menu { display: flex; align-items: center; gap: 26px; }
.nav__menu a {
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}
.nav__menu a:hover { color: var(--ink); }
.nav__cta {
  font-family: var(--f-mono);
  font-size: 13px !important;
  letter-spacing: .04em;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink) !important;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; padding: 6px; cursor: pointer;
}
.nav__toggle span {
  width: 24px; height: 2px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

/* ---------------- LAYOUT PRIMITIVES ---------------- */
.hero,
.section__body,
.footer { max-width: var(--max); margin-inline: auto; }

/* ---------------- HERO ---------------- */
.hero {
  padding: clamp(56px, 10vh, 120px) var(--gutter) clamp(48px, 8vh, 88px);
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 26px;
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.07;
  letter-spacing: -0.015em;
  margin: 0 0 26px;
}
.hero__accent {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-deep) 55%, var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero__lede {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.btn {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero__chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0; margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.hero__chips li {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper-2);
  padding: 7px 13px;
  border-radius: 6px;
}

.hero__portrait { position: relative; }
.hero__portrait::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  z-index: 0;
}
.hero__portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
  display: block;
  background: var(--paper-2);
}

/* ---------------- SECTIONS ---------------- */
.section { padding: clamp(52px, 9vh, 100px) var(--gutter); position: relative; }
.section--alt { background: var(--paper-2); }

.section__index {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  max-width: var(--max);
  margin: 0 auto 32px;
}
.section__index span { color: var(--accent); }

.section__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.section__title--big { font-size: clamp(40px, 8vw, 84px); }
.section__kicker { color: var(--ink-soft); font-size: 18px; margin: 4px 0 0; max-width: 50ch; }

.prose { max-width: none; margin-top: 22px; columns: 2; column-gap: clamp(32px, 5vw, 72px); }
.prose p { margin: 0 0 18px; color: var(--ink-soft); break-inside: avoid; }
.prose p:last-child { margin-bottom: 0; }

/* ---------------- DOMAIN CARDS ---------------- */
.cards {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card { background: var(--paper); padding: 32px 30px; transition: background .25s var(--ease); }
.section--alt .card { background: var(--paper-2); }
.card:hover { background: var(--white); }
.card__num { font-family: var(--f-mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }
.card__title { font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.25; margin: 0 0 10px; }
.card__text { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---------------- EXPERIENCE ---------------- */
.xp { margin-top: 44px; border-top: 1px solid var(--line); }
.xp__item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.xp__when { font-family: var(--f-mono); font-size: 13px; color: var(--accent-deep); padding-top: 4px; }
.xp__role { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 2.6vw, 26px); margin: 0 0 4px; }
.xp__arc { font-family: var(--f-body); font-size: 14px; font-weight: 400; color: var(--mute); }
.xp__org { font-family: var(--f-mono); font-size: 13px; color: var(--ink-soft); margin: 0 0 16px; }
.xp__points { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.xp__points li { margin-bottom: 9px; max-width: 70ch; }
.xp__points li:last-child { margin-bottom: 0; }
.xp__progression {
  margin: 18px 0 0;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--mute);
  letter-spacing: .01em;
}

/* ---------------- WORK ---------------- */
.work { margin-top: 44px; border-top: 1px solid var(--line); }
.work__item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.work__kind { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em; color: var(--mute); }
.work__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 3vw, 28px); margin: 0 0 12px; }
.work__text { margin: 0 0 16px; color: var(--ink-soft); max-width: 60ch; }
.work__link {
  font-family: var(--f-mono); font-size: 13.5px; text-decoration: none;
  color: var(--accent-deep); border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.work__link:hover { border-color: var(--accent-deep); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.tags li { font-family: var(--f-mono); font-size: 12px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; }

/* ---------------- STACK ---------------- */
.stack { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stack__label {
  font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent-deep); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.stack__list { list-style: none; padding: 0; margin: 0; }
.stack__list li { font-size: 15px; color: var(--ink-soft); padding: 5px 0; }

/* ---------------- CREDENTIALS ---------------- */
.creds-grid { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.creds-col__label {
  font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent-deep); margin: 0 0 6px;
}
.creds { list-style: none; padding: 0; margin: 0; }
.creds__item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.creds__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(16px, 2vw, 20px); }
.creds__org { font-family: var(--f-mono); font-size: 12px; color: var(--mute); text-align: right; white-space: nowrap; }
.creds__langs { margin: 30px 0 0; font-size: 16px; color: var(--ink-soft); }
.creds__langs-label {
  display: inline-block; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent-deep); margin-right: 10px;
}

/* ---------------- CONTACT ---------------- */
.section--contact { background: var(--ink); color: var(--paper); }
.section--contact .section__index { color: #8FA0A5; }
.section--contact .section__index span { color: var(--accent); }
.contact__lede { color: #C7CDCD; font-size: 19px; max-width: 54ch; margin: 16px 0 44px; }
.contact__links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; overflow: hidden;
}
.contact__link {
  background: var(--ink); padding: 24px 28px; text-decoration: none;
  display: flex; flex-direction: column; gap: 8px; transition: background .2s var(--ease);
}
.contact__link:hover:not(.contact__link--static) { background: #1F343B; }
.contact__k { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.contact__v { font-size: 18px; color: var(--paper); word-break: break-word; }
.contact__icon { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.contact__resume {
  display: inline-block; margin-top: 28px;
  font-family: var(--f-mono); font-size: 13.5px; text-decoration: none;
  color: var(--paper); border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; padding: 12px 22px; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.contact__resume:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------------- FOOTER ---------------- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--gutter); font-family: var(--f-mono); font-size: 13px; color: var(--mute);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------------- REVEAL ANIMATION ---------------- */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__portrait { max-width: 340px; order: -1; }
  .hero__portrait::before { inset: -10px; }
}

@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav.is-open .nav__menu { opacity: 1; transform: none; pointer-events: auto; }
  .nav__menu a { padding: 8px 0; font-size: 16px; }
  .nav__cta { margin-top: 8px; }

  .prose { columns: 1; }
  .cards { grid-template-columns: 1fr; }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .work__item, .xp__item { grid-template-columns: 1fr; gap: 14px; }
  .contact__links { grid-template-columns: 1fr; }
  .creds-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .stack { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .btn { text-align: center; }
  .creds__item { flex-direction: column; gap: 4px; }
  .creds__org { text-align: left; }
}
