/* ==========================================================================
   Vellum — tracing-paper student portfolio template · archesign.studio
   1. Tokens  2. Base  3. Header  4. Components  5. Pages  6. Footer  7. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --desk: #e9e6dd;
  --paper: #fdfcf8;
  --trace: rgba(246, 241, 216, .78);
  --trace-solid: #f6f1d8;
  --ink: #1f2a44;
  --pencil: #6c7183;
  --red: #d9472b;
  --rule: #d4cfc2;

  --font-sans: "Epilogue", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3vw, 44px);
  --max: 1280px;
  --space: clamp(80px, 10vw, 140px);
  --shadow: 0 1px 1px rgba(31, 42, 68, .08), 0 12px 30px -14px rgba(31, 42, 68, .35);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 300 17px/1.65 var(--font-sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(31, 42, 68, .06) 1px, transparent 1px); background-size: 18px 18px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1; letter-spacing: -.035em; }
h1 em, h2 em { font-weight: 400; font-style: italic; color: var(--red); }
:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }
::selection { background: #fff2a8; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.tag { font: 500 12px var(--font-mono); color: var(--red); margin: 0 0 14px; }
.pencil { color: var(--pencil); }

/* 3. Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--desk); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: 30px; height: 70px; }
.logo { display: inline-flex; align-items: baseline; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; margin-right: auto; }
.logo .mono { font-weight: 400; color: var(--pencil); font-size: 12px; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { font-weight: 600; font-size: 15px; padding: 8px 14px; background: transparent; transition: background .2s; }
.site-nav a:hover { background: var(--paper); }
.site-nav a[aria-current="page"] { background: var(--trace-solid); box-shadow: var(--shadow); rotate: -1.5deg; }
.avail { display: inline-flex; align-items: center; gap: 8px; color: var(--pencil); }
.avail i { width: 8px; height: 8px; border-radius: 50%; background: #2ea36a; box-shadow: 0 0 0 3px rgba(46, 163, 106, .2); }
.menu-btn { display: none; }

/* 4. Components ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; background: var(--ink); color: #fff; border: 0; font: 600 15px var(--font-sans); cursor: pointer; box-shadow: var(--shadow); transition: background .2s, rotate .2s; }
.btn:hover { background: var(--red); rotate: -1deg; }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { background: var(--trace-solid); color: var(--ink); }
.sheet { background: var(--paper); box-shadow: var(--shadow); position: relative; }
.sheet--trace { background: var(--trace); }
.tape::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: rgba(255, 244, 196, .75); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); rotate: -3deg; }
.js .reveal { opacity: 0; transition: opacity .8s ease; }
.js .reveal.is-in { opacity: 1; }

/* 5. Pages ----------------------------------------------------------------- */
/* hero */
.hero { padding: clamp(40px, 6vw, 80px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(26px, 5vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(52px, 7vw, 108px); }
.hero .lead { font-size: 20px; color: #3b4360; max-width: 38ch; margin: 26px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stack { position: relative; aspect-ratio: 11 / 9; }
.stack .s { position: absolute; padding: 10px; transition: translate .4s ease, rotate .4s ease; }
.stack .s img { width: 100%; }
.stack .s1 { left: 0; top: 6%; width: 74%; rotate: -4deg; }
.stack .s2 { right: 0; top: 0; width: 66%; rotate: 3deg; background: var(--trace); }
.stack .s2 img { mix-blend-mode: multiply; opacity: .9; }
.stack .s3 { left: 22%; bottom: 0; width: 46%; rotate: -1deg; }
.stack .s:hover { translate: 0 -10px; z-index: 3; }
.stack .label { position: absolute; bottom: -6px; right: 12px; font: 500 11px var(--font-mono); background: var(--red); color: #fff; padding: 3px 8px; }

/* years */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.sec-head h2 { font-size: clamp(38px, 4.6vw, 68px); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; }
.card { display: block; padding: 12px 12px 16px; }
.card:nth-child(3n + 1) { rotate: -1.2deg; }
.card:nth-child(3n + 2) { rotate: .8deg; }
.card:nth-child(3n) { rotate: -.4deg; }
.card:hover { rotate: 0deg; }
.card img { width: 100%; aspect-ratio: 9 / 7; object-fit: cover; border: 1px solid var(--rule); }
.card .yr { font: 500 12px var(--font-mono); color: var(--red); margin: 12px 0 4px; display: block; }
.card h3 { font-size: 22px; letter-spacing: -.02em; }
.card p { margin: 6px 0 0; font-size: 15px; color: var(--pencil); }

/* note */
.note { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); background: var(--trace-solid); box-shadow: var(--shadow); rotate: -.6deg; font-size: 20px; }
.note p:last-child { margin: 0; }
.note .sig { font: italic 400 22px var(--font-sans); color: var(--red); margin-top: 16px; }

/* page head */
.page-head { padding: clamp(46px, 7vw, 100px) 0 clamp(30px, 4vw, 50px); }
.page-head h1 { font-size: clamp(52px, 8vw, 120px); }
.page-head p { max-width: 54ch; font-size: 19px; color: #3b4360; margin: 20px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button { font: 500 13px var(--font-mono); color: var(--ink); background: var(--paper); border: 0; padding: 9px 14px; cursor: pointer; box-shadow: var(--shadow); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; rotate: -2deg; }

/* layers (project) */
.brief { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(26px, 5vw, 70px); align-items: start; }
.brief dl { margin: 0; }
.brief dl div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--rule); font-size: 15px; }
.brief dt { font: 500 12px var(--font-mono); color: var(--pencil); padding-top: 3px; }
.brief dd { margin: 0; }
.layers { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.layer-ctl { padding: 18px; }
.layer-ctl legend { font: 500 12px var(--font-mono); color: var(--red); margin-bottom: 12px; }
.layer-ctl fieldset { border: 0; padding: 0; margin: 0; }
.layer-ctl label { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: 15px; cursor: pointer; }
.layer-ctl input { width: 18px; height: 18px; accent-color: var(--red); }
.board { position: relative; aspect-ratio: 3 / 2; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.board img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.board .ly-plan, .board .ly-section { mix-blend-mode: multiply; opacity: .55; }
.board .ly-plan { background: var(--trace-solid); }
.layers:has(#l-site:not(:checked)) .ly-site { opacity: 0; }
.layers:has(#l-plan:not(:checked)) .ly-plan { opacity: 0; }
.layers:has(#l-section:not(:checked)) .ly-section { opacity: 0; }
.layers:has(#l-model:checked) .ly-model { opacity: 1; }
.board .ly-model { opacity: 0; }
.process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.process figure { margin: 0; padding: 10px; }
.process figure:nth-child(2) { rotate: 1deg; }
.process img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.process figcaption { font: 400 13px var(--font-mono); color: var(--pencil); margin-top: 8px; }
.crit { font-size: 22px; font-weight: 300; line-height: 1.45; max-width: 36ch; }
.crit cite { display: block; margin-top: 12px; font: 500 12px var(--font-mono); font-style: normal; color: var(--red); }

/* about */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(26px, 5vw, 80px); align-items: start; }
.polaroid { padding: 12px 12px 46px; rotate: -3deg; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid span { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: italic 400 18px var(--font-sans); }
.skills { display: grid; gap: 12px; margin-top: 26px; }
.skill { display: grid; grid-template-columns: 150px 1fr 40px; gap: 14px; align-items: center; font-size: 15px; }
.skill .bar { height: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); position: relative; }
.skill .bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); background: repeating-linear-gradient(45deg, var(--ink) 0 3px, transparent 3px 6px); }
.skill em { font: 400 12px var(--font-mono); font-style: normal; color: var(--pencil); }
.awards { list-style: none; padding: 0; margin: 0; }
.awards li { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.awards b { font: 500 13px var(--font-mono); color: var(--red); }

/* cv */
.cv { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(26px, 5vw, 70px); padding: clamp(22px, 4vw, 54px); }
.cv h2 { font-size: 30px; }
.cv-block + .cv-block { margin-top: 36px; }
.cv-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-top: 1px dashed var(--rule); }
.cv-row .when { font: 500 12px var(--font-mono); color: var(--pencil); padding-top: 3px; }
.cv-row b { display: block; font-weight: 600; }
.cv-row span { font-size: 15px; color: var(--pencil); }

/* contact */
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(26px, 5vw, 60px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(20px, 3vw, 36px); }
.form > *, .field { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full, .actions, .form-note { grid-column: 1 / -1; }
.field label { font: 500 12px var(--font-mono); color: var(--pencil); }
.field input, .field select, .field textarea { font: 400 17px var(--font-sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 8px 0; min-width: 0; max-width: 100%; }
.field textarea { min-height: 130px; resize: vertical; background-image: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px); line-height: 32px; border-bottom: 0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.form-note { margin: 0; padding: 12px 14px; background: #fff2a8; font: 400 13px var(--font-mono); }
.card-note { padding: 26px; rotate: 1.5deg; background: var(--trace-solid); }
.card-note h3 { font-size: 26px; margin-bottom: 10px; }
.card-note ul { list-style: none; padding: 0; margin: 16px 0 0; }
.card-note li { padding: 8px 0; border-top: 1px dashed var(--rule); font-size: 15px; }

/* 6. Footer ---------------------------------------------------------------- */
.site-footer { margin-top: var(--space); padding-bottom: 30px; }
.f-sheet { padding: clamp(26px, 5vw, 64px); rotate: -.5deg; }
.f-sheet h2 { font-size: clamp(40px, 5.6vw, 84px); margin-bottom: 18px; }
.f-sheet p { max-width: 50ch; color: #3b4360; }
.f-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.f-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; color: var(--pencil); }
.f-base a:hover { color: var(--red); }

/* 7. Responsive ------------------------------------------------------------ */
@media (max-width: 1000px) {
  .avail { display: none; }
  .cards, .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-block; margin-left: auto; position: relative; z-index: 60; background: var(--ink); color: #fff; border: 0; padding: 9px 16px; font: 600 14px var(--font-sans); cursor: pointer; }
  .site-nav { position: fixed; inset: 0; z-index: 55; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: 0 var(--gutter); background: var(--desk); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .site-nav a { font-size: 44px; font-weight: 800; letter-spacing: -.04em; background: var(--paper); box-shadow: var(--shadow); padding: 6px 18px; }
  .site-nav a:nth-child(odd) { rotate: -2deg; }
  .site-nav a:nth-child(even) { rotate: 1.5deg; }
  .site-nav a[aria-current="page"] { background: var(--trace-solid); }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .hero-grid, .brief, .layers, .about-grid, .cv, .contact, .form { grid-template-columns: 1fr; }
  .layer-ctl fieldset { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .layer-ctl label { border: 0; }
  .polaroid { max-width: 340px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .cards, .process { grid-template-columns: 1fr; }
  .skill { grid-template-columns: 1fr 40px; }
  .skill .bar { grid-column: 1 / -1; grid-row: 2; }
  .cv-row { grid-template-columns: 1fr; gap: 2px; }
  .hero h1 { font-size: 50px; }
  .stack .label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
