/* ============================================================
   Personal portfolio · Vanilla CSS
   Aesthetic: dark, minimal, generous spacing, large display type
   ============================================================ */

/* -------- Tokens -------- */
:root {
  --bg:        #0A0A0A;
  --bg-soft:   #0F0F0F;
  --bg-card:   #111111;
  --bg-hover:  #141414;
  --line:      #1F1F1F;
  --line-2:    #2A2A2A;
  --fg:        #EDEDED;
  --muted:     #888888;
  --muted-2:   #5A5A5A;
  --accent:    #EDEDED;

  --max:       1200px;
  --gutter:    clamp(20px, 4vw, 40px);
  --section-y: clamp(80px, 12vw, 160px);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.2,.6,.2,1);
  --t-fast: 180ms var(--ease);
  --t-med:  300ms var(--ease);
  --t-slow: 600ms var(--ease);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* -------- Reset & base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea, button { color: inherit; font-family: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
::selection { background: var(--fg); color: var(--bg); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background var(--t-med), color var(--t-med), border-color var(--t-med), transform var(--t-med);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--outline {
  border-color: var(--line-2);
  color: var(--fg);
}
.btn--outline:hover {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}
.btn--filled {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn--filled:hover {
  background: transparent;
  color: var(--fg);
}

/* -------- Navbar -------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), background var(--t-med);
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.nav__star {
  color: var(--fg);
  font-size: 14px;
  transition: transform var(--t-slow);
}
.nav__logo:hover .nav__star { transform: rotate(180deg); }

.nav__links {
  display: flex;
  gap: 26px;
  justify-self: center;
  font-size: 14px;
  color: var(--muted);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color var(--t-fast);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cta { justify-self: end; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }
}

/* -------- Hero -------- */
.hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: var(--section-y);
}
.hero__grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
}

/* profile card */
.profile {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: linear-gradient(180deg, #0E0E0E, #0A0A0A);
  position: sticky;
  top: 100px;
}
@media (max-width: 960px) {
  .profile { position: static; }
}
.profile__photo {
  aspect-ratio: 4/5;
  width: 100%;
  background:
    repeating-linear-gradient(45deg, #161616 0 12px, #121212 12px 24px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.profile__meta { padding-top: 18px; }
.profile__name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.profile__pitch {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.socials {
  display: flex;
  gap: 8px;
}
.socials a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.socials a:hover {
  color: var(--fg);
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.profile__status {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5CC689;
  box-shadow: 0 0 0 3px rgba(92,198,137,0.18);
}

/* hero right column */
.hero__eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.92;
  font-size: clamp(3.2rem, 9vw, 8rem);
}
.display__slash {
  display: inline-block;
  color: var(--muted-2);
  font-weight: 500;
}
.hero__lede {
  margin: 28px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
}

/* KPIs */
.kpis {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kpi {
  padding: 24px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kpi:last-child { border-right: 0; }
.kpi__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.kpi__label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.4;
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .kpi:last-child { border-bottom: 0; }
}

/* tag badges */
.tags {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--fg);
  transition: background var(--t-med), border-color var(--t-med), transform var(--t-med);
}
.tag:hover {
  background: var(--bg-hover);
  border-color: var(--line-2);
}
.tag__path {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  transition: transform var(--t-med), color var(--t-med);
}
.tag:hover .tag__path { color: var(--fg); transform: translateX(2px); }

/* -------- Sections -------- */
.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.section__head {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section__index {
  color: var(--muted-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  padding-bottom: 8px;
}
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.94;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}
.section__sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  max-width: 28ch;
  text-align: right;
}
@media (max-width: 720px) {
  .section__head { grid-template-columns: 48px 1fr; gap: 14px; }
  .section__sub { grid-column: 1 / -1; text-align: left; padding-top: 8px; }
}

/* -------- Rows (Projects / Experience / Thoughts) -------- */
.rows {
  display: flex;
  flex-direction: column;
}
.row { border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row__link {
  display: grid;
  grid-template-columns: 96px 1fr auto 36px;
  align-items: center;
  gap: 24px;
  padding: 22px;
  transition: background var(--t-med), padding var(--t-med);
}
.row__link:hover { background: var(--bg-hover); }

.row--text .row__link {
  grid-template-columns: 1fr auto 36px;
}

.row__thumb {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.row__body { min-width: 0; }
.row__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.01em;
}
.row__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.row__meta {
  color: var(--muted);
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  white-space: nowrap;
}
.row__arrow {
  font-size: 20px;
  color: var(--muted);
  transition: transform var(--t-med), color var(--t-med);
  justify-self: end;
}
.row__link:hover .row__arrow {
  color: var(--fg);
  transform: translate(4px, -4px);
}

@media (max-width: 640px) {
  .row__link {
    grid-template-columns: 64px 1fr 24px;
    gap: 16px;
    padding: 18px 12px;
  }
  .row--text .row__link { grid-template-columns: 1fr 24px; }
  .row__thumb { width: 64px; height: 64px; }
  .row__meta { display: none; }
}

/* -------- Tools grid -------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 960px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools-grid { grid-template-columns: 1fr; } }

.tool {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: background var(--t-med), border-color var(--t-med), transform var(--t-med);
}
.tool:hover {
  background: var(--bg-hover);
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.tool__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg);
  margin-bottom: 20px;
}
.tool__name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.tool__cat {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* -------- Contact form -------- */
.section--contact { padding-bottom: clamp(80px, 10vw, 140px); }
.form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 820px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 10px 0;
  font-size: 16px;
  color: var(--fg);
  transition: border-color var(--t-med);
  border-radius: 0;
  outline: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--fg);
}
.field textarea { resize: vertical; min-height: 96px; font-family: inherit; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 24px;
}
.select-wrap select option { background: var(--bg-card); color: var(--fg); }
.select-wrap__chev {
  position: absolute;
  right: 0; bottom: 8px;
  color: var(--muted);
  pointer-events: none;
  font-size: 18px;
  line-height: 1;
}

.form__submit {
  align-self: flex-start;
  padding: 14px 22px;
  font-size: 14px;
  margin-top: 8px;
}

/* -------- Footer -------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.footer__socials {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
.footer__socials a { transition: color var(--t-fast); }
.footer__socials a:hover { color: var(--fg); }

/* -------- Reveal on scroll -------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
