/* ============================================================
   TOBIAS REBANT — PORTFOLIO STYLESHEET
   ------------------------------------------------------------
   One shared stylesheet for both pages (index.html + resume.html).

   HOW THIS FILE IS ORGANISED
     1.  Design tokens .......... colors, fonts (edit these first)
     2.  Base / resets
     3.  Layout primitives ...... page background, paper "cards"
     4.  Buttons & nav
     5.  Hero
     6.  Section labels
     7.  Experience ledger
     8.  Projects
     9.  Footer
    10.  Résumé page
    11.  Responsive (phones / tablets)
    12.  Print (clean PDF output)

   TIP: almost every color and font is a variable in section 1.
   Change a value there once and it updates everywhere.
   ============================================================ */


/* === 1. DESIGN TOKENS ======================================
   These CSS custom properties are the "single source of truth".
   Want a different accent color? Change --red below. */
:root {
  /* Surfaces */
  --bg:          #e7e5df;  /* page background behind the paper  */
  --paper:       #f2e9d4;  /* main parchment surface            */
  --paper-deep:  #ece0c6;  /* slightly darker panels / footer   */

  /* Ink + text */
  --ink:         #232a30;  /* near-black headings / borders     */
  --navy:        #2b3b54;  /* secondary accent (labels, badges) */
  --red:         #aa3a2b;  /* primary accent (kicker, numbers)  */
  --text:        #4a4538;  /* body copy                         */
  --muted:       #5d5644;  /* quieter text                      */
  --faint:       #857a60;  /* faintest labels / meta            */

  /* Hairlines */
  --line:        rgba(35, 42, 48, 0.20);
  --line-strong: rgba(35, 42, 48, 0.30);

  /* Type */
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;  /* headings + body */
  --mono:  'IBM Plex Mono', ui-monospace, monospace;       /* labels + data   */

  /* Layout widths */
  --portfolio-width: 1100px;
  --resume-width:    816px;   /* ~ US-Letter width at 96dpi      */
}


/* === 2. BASE / RESETS ====================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  /* nicer line breaks for headings/paragraphs where supported */
  text-wrap: pretty;
}

img { display: block; max-width: 100%; }

a { color: inherit; }


/* === 3. LAYOUT PRIMITIVES ================================== */

/* Outer page padding (sits behind the paper card) */
.page {
  min-height: 100vh;
  padding: 48px 16px 64px;
}

/* The cream "paper" sheet that holds the content */
.card {
  max-width: var(--portfolio-width);
  margin: 0 auto;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

/* A thin engraved tick-ruler strip — reused as a divider.
   Decorative only. Delete anywhere you don't want it. */
.ruler {
  height: 16px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background-image: repeating-linear-gradient(
    90deg, rgba(35, 42, 48, 0.30) 0 1px, transparent 1px 12px);
}


/* === 4. BUTTONS & NAV ====================================== */

/* Small uppercase mono label used for nav + buttons */
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 46px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
}
.brand-name {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
}
.nav { display: flex; gap: 30px; }
.nav a {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }

/* Buttons */
.btn-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none;
  padding: 13px 30px;
  border: 1px solid var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--navy); border-color: var(--navy); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }


/* === 5. HERO =============================================== */
.hero { position: relative; padding: 54px 46px 46px; }
/* little registration "+" mark in the corner (decorative) */
.hero::after {
  content: "+";
  position: absolute; top: 16px; right: 22px;
  font-family: var(--mono); font-size: 11px; color: var(--red);
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--serif); font-weight: 500;
  font-size: 52px; line-height: 1.05; letter-spacing: -1px;
  margin: 0 0 18px; max-width: 760px;
}
.hero-sub {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.5; color: var(--muted);
  max-width: 560px; margin: 0 0 30px;
}


/* === 6. SECTION LABELS ====================================
   The "SELECTED WORK / 03 ENTRIES" style header rows. */
.section-bar {
  display: flex; justify-content: space-between;
  padding: 18px 46px 4px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--faint);
}


/* === 7. EXPERIENCE LEDGER ================================== */
.experience {
  display: grid;
  grid-template-columns: 300px 1fr;  /* left = company, right = wins */
  gap: 40px;
  padding: 30px 46px 40px;
  border-top: 1px solid var(--line);
}
.exp-org   { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.12; margin: 0 0 8px; }
.exp-role  { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--navy); margin-bottom: 6px; }
.exp-when  { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--faint); line-height: 1.7; }

.exp-rows  { display: flex; flex-direction: column; }
.exp-row {
  display: grid;
  grid-template-columns: 128px 1fr;   /* metric | description */
  gap: 20px; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(35, 42, 48, 0.16);
}
.exp-row:last-child { border-bottom: 0; }
/* The big red "readout" number on the left of each row */
.exp-metric {
  font-family: var(--mono); font-size: 20px; line-height: 1; color: var(--red);
}
.exp-metric small {
  display: block; margin-top: 5px;
  font-size: 11px; letter-spacing: 1px; color: var(--faint);
}
/* When the metric is a word (e.g. "AI AGENT") rather than a number */
.exp-metric--tag { font-size: 13px; line-height: 1.3; letter-spacing: 0.5px; color: var(--navy); }
.exp-text { font-family: var(--serif); font-size: 17px; line-height: 1.5; color: var(--text); margin: 0; }


/* === 8. PROJECTS ==========================================
   Each project is a 2-column row (text + image).
   Add the class `project--reverse` to flip the sides. */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center;
  padding: 34px 46px;
  border-top: 1px solid var(--line);
}
.project--reverse .project-body  { order: 2; }
.project--reverse .project-media { order: 1; }

.project-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.project-num  { font-family: var(--mono); font-size: 13px; color: var(--red); }

/* status pill (e.g. "Live · Web App") */
.badge {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 9px; border: 1px solid currentColor;
}
.badge--navy { color: var(--navy); }
.badge--red  { color: var(--red); }

.project-title { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.05; margin: 0 0 12px; }
.project-desc  { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--text); margin: 0 0 18px; }

/* tech tags */
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid rgba(35, 42, 48, 0.28); padding: 4px 11px;
}

/* image framed like a mounted plate */
.project-media .frame {
  border: 1px solid var(--ink);
  padding: 7px;
  background: var(--paper-deep);
}
.project-media .frame img { border: 1px solid var(--line-strong); width: 100%; height: auto; }

/* placeholder block for projects without a final image yet */
.placeholder {
  height: 260px;
  border: 1px solid var(--ink);
  background-color: var(--paper-deep);
  background-image: repeating-linear-gradient(45deg, rgba(35, 42, 48, 0.07) 0 9px, transparent 9px 18px);
  display: flex; align-items: center; justify-content: center;
}
.placeholder span {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  color: var(--faint); text-align: center; padding: 0 16px;
}


/* === 9. FOOTER ============================================= */
.footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 48px 46px;
  border-top: 1px solid var(--ink);
  background: var(--paper-deep);
}
.footer-cta   { font-family: var(--serif); font-size: 32px; font-weight: 500; margin-bottom: 8px; }
.footer-email { font-family: var(--mono); font-size: 13px; color: var(--red); text-decoration: none; letter-spacing: 1px; }
.footer-meta  { text-align: right; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--faint); line-height: 1.9; }


/* === 10. RÉSUMÉ PAGE ======================================
   resume.html reuses .page; the sheet is narrower (letter width). */
.resume-toolbar {
  max-width: var(--resume-width);
  margin: 0 auto 16px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px;
}
.resume-toolbar a { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; }
.resume-toolbar .back { color: var(--muted); }
.resume-toolbar .back:hover { color: var(--ink); }
.resume-toolbar .download { color: var(--paper); background: var(--ink); padding: 9px 18px; border: 1px solid var(--ink); }
.resume-toolbar .download:hover { background: var(--navy); border-color: var(--navy); }

.sheet {
  max-width: var(--resume-width);
  margin: 0 auto;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.14);
  padding: 56px 64px 52px;
}

/* masthead */
.r-masthead { text-align: center; }
.r-name    { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -0.5px; margin: 0 0 12px; }
.r-tagline { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.5; color: var(--text); max-width: 60ch; margin: 0 auto 16px; }
.r-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.5px; color: var(--muted); }
.r-contact .dot { color: var(--faint); }
.r-contact a { text-decoration: none; }
.r-contact a.email { color: var(--red); }

/* a section header with a trailing rule: LABEL ───────── */
.r-section {
  display: flex; align-items: center; gap: 14px;
  margin: 32px 0 16px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink);
}
.r-section::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.r-section:first-of-type { margin-top: 38px; }

/* education + generic two-up row (label left, date right) */
.r-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.r-strong { font-family: var(--serif); font-weight: 600; font-size: 18px; }
.r-light  { font-family: var(--serif); font-size: 18px; color: var(--text); }
.r-date   { flex: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.5px; color: var(--faint); }

/* skills grid */
.r-skills { display: flex; flex-direction: column; gap: 9px; }
.r-skill { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: baseline; }
.r-skill dt { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); margin: 0; }
.r-skill dd { font-family: var(--serif); font-size: 16px; line-height: 1.45; color: #312f28; margin: 0; }

/* jobs */
.r-job { margin-bottom: 24px; }
.r-job:last-child { margin-bottom: 0; }
.r-job-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 11px; }
.r-job-title { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--navy); }
.r-job-loc   { flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px; color: var(--faint); }

/* bullet lists (shared by jobs + projects) */
.r-bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.r-bullets li { position: relative; padding-left: 20px; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--text); }
.r-bullets li::before { content: "\203A"; position: absolute; left: 0; top: 0; color: var(--red); font-family: var(--mono); }
.r-bullets strong { font-weight: 600; color: var(--ink); }


/* === 11. RESPONSIVE =======================================
   Collapses the two-column layouts to a single column on phones. */
@media (max-width: 760px) {
  .topbar { flex-direction: column; gap: 14px; align-items: flex-start; padding: 18px 24px; }
  .hero { padding: 36px 24px 32px; }
  .hero-title { font-size: 34px; }
  .section-bar { padding: 16px 24px 4px; }

  /* stack experience + projects */
  .experience { grid-template-columns: 1fr; gap: 22px; padding: 26px 24px 32px; }
  .exp-row { grid-template-columns: 100px 1fr; gap: 14px; }
  .project { grid-template-columns: 1fr; gap: 22px; padding: 28px 24px; }
  .project--reverse .project-body  { order: 1; }  /* keep text first on mobile */
  .project--reverse .project-media { order: 2; }
  .project-title { font-size: 28px; }

  .footer { flex-direction: column; align-items: flex-start; gap: 20px; padding: 36px 24px; }
  .footer-meta { text-align: left; }

  /* résumé */
  .sheet { padding: 36px 26px 40px; }
  .r-name { font-size: 34px; }
  .r-skill { grid-template-columns: 1fr; gap: 2px; }
}


/* === 12. PRINT ============================================
   Makes resume.html print as a clean PDF (Ctrl/Cmd-P).
   Hides the screen chrome and drops the paper texture. */
@media print {
  .no-print { display: none !important; }
  body, .page { background: #fff !important; padding: 0 !important; }
  .sheet { box-shadow: none !important; margin: 0 !important; max-width: none; }
  @page { margin: 14mm; }
}
