/* Portfolio, hand-set — editorial paper/ink. Coded by hand, not generated. */

:root {
  color-scheme: light;
  --paper: #f6f4ee;
  --ink: #1c1a17;
  --muted: #6f6a5e;
  --accent: #c2410c;
  --accent-dark: #a3330b;
  --tint: #ede8dd;
  --feature-tint: #fdf0e8;
  --rule: rgba(28, 26, 23, 0.18);
  --rule-strong: rgba(28, 26, 23, 0.9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 68px; width: min(1120px, 100% - 48px); margin-inline: auto;
}
.brand {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem;
  letter-spacing: -0.01em; padding: 12px 0;
}
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex; gap: 24px; margin-left: auto; align-items: center;
  font-size: 0.95rem; font-weight: 500;
}
.nav-links a { color: var(--muted); padding: 13px 0; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current] { border-bottom: 2px solid var(--accent); }
.nav-links .nav-cta {
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid var(--ink); border-radius: 4px;
  padding: 11px 22px; color: var(--ink) !important;
  transition: background .18s ease, color .18s ease;
}
.nav-links .nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; margin-left: auto; }
.menu-btn span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--ink); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; width: min(1120px, 100% - 48px); margin-inline: auto; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.section-head { margin-bottom: 30px; }
.section h2 { font-family: "Fraunces", serif; font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -0.015em; line-height: 1.1; }
.section-sub { grid-column: 2; color: var(--muted); font-size: 0.98rem; margin-top: 6px; }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 2px; background: var(--accent); vertical-align: middle; margin-right: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; width: min(1120px, 100% - 48px); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
  padding: clamp(56px, 7vw, 96px) 0 72px;
}
.glow {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background: radial-gradient(560px circle at var(--mx, 70%) var(--my, 30%), rgba(194, 65, 12, 0.10), transparent 60%);
}
.hero h1 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.02; letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; color: var(--accent-dark); }
.role { margin-top: 16px; font-size: 1.05rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.typed-line {
  margin-top: 20px; font-family: "Fraunces", serif; font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0;
}
.typed-line #typed { color: var(--accent-dark); font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -0.12em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { margin-top: 24px; max-width: 52ch; color: #37342f; font-size: 1.08rem; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 4px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: background .18s, color .18s, border-color .18s; border: 1px solid transparent; }
.btn-ink, .btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover, .btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline, .btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover, .btn-ghost:hover { background: var(--ink); color: var(--paper); }

.socials { display: flex; gap: 14px; margin-top: 30px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 4px; color: var(--muted);
}
.socials a:hover { color: var(--ink); border-color: var(--ink); }
.socials svg { width: 20px; height: 20px; }

.hero-pic img {
  width: min(300px, 100%); border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 10px var(--paper), 0 0 0 11px var(--rule);
}

.caveat {
  font-family: "Caveat", cursive; font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  color: var(--accent-dark); margin-top: 18px; transform: rotate(-1deg); display: inline-block;
}

/* ---------- About / stats ---------- */
.about-top { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; margin-bottom: 40px; }
.about-pic {
  width: min(240px, 100%); border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 8px var(--paper), 0 0 0 9px var(--rule);
}
.about-top p { font-size: 1.05rem; color: #37342f; max-width: 62ch; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 48px;
}
.stats div { padding: 20px 18px; border-right: 1px solid var(--rule); }
.stats div:last-child { border-right: 0; }
.stats b { font-family: "Fraunces", serif; font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; display: block; }
.stats span { color: var(--muted); font-size: 0.85rem; line-height: 1.45; display: block; margin-top: 4px; }

/* Two-column document panels */
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: start; }
.panel h3 { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.35rem; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px; }
.panel h4 { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.1rem; margin-top: 20px; }
.panel > h4:first-of-type { margin-top: 0; }
.panel ul { margin-top: 8px; display: grid; gap: 6px; color: #37342f; font-size: 0.96rem; }
.panel ul li { padding-left: 16px; position: relative; }
.panel ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.panel .note { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.panel .note a { text-decoration: underline; text-underline-offset: 3px; }
.panel .sub { margin-top: 14px; padding: 14px 16px; background: var(--tint); border-left: 2px solid var(--accent); }
.panel .sub .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }

/* Timeline — ruled editorial list */
.timeline { border-top: 1px solid var(--rule); }
.timeline > li { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.timeline .when { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-dark); }
.timeline h4 { margin-top: 6px; }
.timeline .meta { font-size: 0.88rem; color: var(--muted); margin-top: 2px; }

/* ---------- Skills ---------- */
.skills { border-top: 1px solid var(--rule); }
.skills li {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 18px;
  padding: 12px 0 14px; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.skills strong { font-weight: 600; font-size: 0.98rem; }
.lvl { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lvl-basic { color: var(--muted); }
.lvl-intermediate { color: var(--accent-dark); }
.lvl-professional, .lvl-excellent { color: var(--accent); }
.bar {
  grid-column: 1 / -1; height: 3px; background: var(--tint); position: relative; overflow: hidden;
}
.bar::after {
  content: ""; position: absolute; inset: 0; width: var(--w, 50%);
  background: var(--ink); transform: scaleX(0); transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.skills.on .bar::after { transform: scaleX(1); }

/* ---------- Projects — polaroids ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 30px; }
.project {
  background: #ffffff; border: 1px solid var(--rule);
  box-shadow: 0 2px 0 var(--rule), 8px 12px 24px rgba(28,26,23,0.10);
  display: flex; flex-direction: column;
}
.project img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; border-bottom: 1px solid var(--rule); }
.project-body { padding: 14px 6px 4px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-body h3 { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.2rem; }
.project-body p { color: #37342f; font-size: 0.94rem; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.links .btn { min-height: 40px; padding: 8px 16px; font-size: 0.88rem; }

/* ---------- Contact — ruled ledger ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; border-top: 1px solid var(--rule-strong); padding-top: 40px; }
.contact h2 { margin-top: 6px; }
.contact p { margin-top: 14px; color: #37342f; max-width: 48ch; }
.contact-list { border-top: 1px solid var(--rule); }
.contact-list li {
  display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: baseline;
  padding: 16px 4px; border-bottom: 1px solid var(--rule);
}
.contact-list span { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-weight: 600; word-break: break-word; border-bottom: 2px solid var(--accent); display: inline-block; padding: 12px 0; }
.contact-list a:hover { color: var(--accent-dark); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--rule); padding: 22px 0; }
.footer-inner { width: min(1120px, 100% - 48px); margin-inline: auto; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.footer a { text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 12px 0; }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .bar::after { transition: none; }
  .caveat { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2n) { border-right: 0; }
  .stats div { border-bottom: 1px solid var(--rule); }
  .stats div:nth-child(n+3) { border-bottom: 0; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-pic img { width: min(280px, 80%); }
  .about-top { grid-template-columns: 1fr; }
  .about-pic { width: min(240px, 70%); }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { flex-wrap: wrap; height: 60px; row-gap: 0; }
  .nav-links {
    display: none; order: 3; width: 100%; flex-direction: column; gap: 0;
    background: var(--paper); border-top: 1px solid var(--rule); padding: 8px 0 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; }
  .nav-links .nav-cta { border: 0; border-radius: 0; font-size: inherit; line-height: inherit; padding: 12px 4px; }
  .nav-links .nav-cta:hover { background: none; color: var(--ink) !important; }
}
