/* =====================================================
   Personal Site — Shared Stylesheet
   Inherits CV's design language: cream + Inter + Playfair italic accent.
   ===================================================== */

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

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #f5f3ee;
  color: #1a1a1a;
  line-height: 1.5;
  font-feature-settings: "ss01" on, "kern" on;
}

a { color: inherit; }

/* ===== TOP NAVIGATION ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #d8d3c5;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site-nav .brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.site-nav .brand img {
  display: block;
  height: 19px;
  width: auto;
}
.site-nav .nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}
.site-nav .nav-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a5a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav .nav-links a:hover { color: #1a1a1a; }
.site-nav .nav-links a.current {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}
@media (max-width: 720px) {
  .site-nav { padding: 12px 20px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav .nav-links { gap: 16px; flex-wrap: wrap; }
  .site-nav .nav-links a { font-size: 10px; letter-spacing: 0.15em; }
}

/* ===== PAGE CONTAINER ===== */
.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 40px 96px;
}
.page.wide {
  max-width: 1140px;
}
@media (max-width: 720px) {
  .page { padding: 48px 24px 80px; }
}

/* ===== HEADINGS ===== */
.hero-name {
  font-size: clamp(23px, 3.5vw, 38px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 12pt;
}
.hero-name .first {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
}
.hero-name .last {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}
.hero-tagline {
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 400;
  color: #4a4a3a;
  margin-bottom: 32px;
  line-height: 1.55;
}
.hero-tagline em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  color: #1a1a1a;
}

.page-title {
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.page-title .first {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
}
.page-title .last {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

/* ===== SECTION SCAFFOLD (used in About / CV-style pages) ===== */
section.body-section {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid #d8d3c5;
  align-items: start;
}
section.body-section:first-of-type { border-top: none; padding-top: 8px; }
@media (max-width: 720px) {
  section.body-section {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 0;
  }
}
section.body-section .label-col {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* ===== ABOUT-specific (CV content) ===== */
.summary {
  font-weight: 300;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: #1a1a1a;
  max-width: 640px;
}
.summary strong { font-weight: 600; }

/* Skills (vertical groups) */
.skills .group { margin-bottom: 14px; }
.skills .group:last-child { margin-bottom: 0; }
.skills .group .cat {
  display: block;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.skills .group .items {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1a1a1a;
}

/* Experience roles */
.role { margin-bottom: 18px; }
.role:last-child { margin-bottom: 0; }
.role-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 6px;
}
.role-head .company {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.role-head .title {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: #4a4a3a;
}
.role-head .when {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a5a;
  margin-left: auto;
  white-space: nowrap;
}
.role-bullets {
  list-style: none;
  counter-reset: c;
}
.role-bullets li {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1a1a1a;
  margin-bottom: 6px;
  padding-left: 30px;
  position: relative;
}
.role-bullets li::before {
  counter-increment: c;
  content: counter(c, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-weight: 500;
  font-size: 12px;
  color: #6a6a5a;
}
.role-bullets li strong { font-weight: 600; }

.role-link {
  display: inline-block;
  margin-top: 6px;
  margin-left: 30px;
  font-size: 11.5px;
  font-style: italic;
  color: #6a6a5a;
  text-decoration: none;
  border-bottom: 1px solid #d8d3c5;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.role-link:hover { color: #1a1a1a; border-bottom-color: #1a1a1a; }
.role-link .arrow { font-style: normal; margin-right: 4px; }

/* Education + Languages — 2 column */
.ed-lang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .ed-lang { grid-template-columns: 1fr; gap: 14px; } }
.ed-lang .item {
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 6px;
}
.ed-lang .item .school { font-weight: 600; }
.ed-lang .item .meta {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #6a6a5a;
  font-size: 13px;
}

/* Contact rows (CV style) */
.contact-info {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 24px;
  align-items: baseline;
}
.contact-info .cat {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.contact-info .items a {
  font-size: 14px;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #d8d3c5;
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.contact-info .items a:hover { border-bottom-color: #1a1a1a; }

/* ===== SHOWREEL PAGE ===== */
.showreel-stage {
  width: 100%;
  max-width: 100%;
  margin: 32px 0;
}
.showreel-stage .video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border-radius: 4px;
  overflow: hidden;
}
.showreel-stage .video-wrap iframe,
.showreel-stage .video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

/* For vertical/portrait showreels (9:16) */
.showreel-stage.portrait .video-wrap {
  aspect-ratio: 9 / 16;
  height: min(78vh, 720px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.showreel-caption {
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 400;
  color: #4a4a3a;
  line-height: 1.6;
  max-width: 640px;
}

/* ===== ART PAGE — GRID ===== */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .art-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 540px) {
  .art-grid { grid-template-columns: 1fr; gap: 20px; }
}
.art-card {
  text-decoration: none;
  color: inherit;
  display: block;
  background: #ebe7dc;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.art-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}
.art-card .thumb {
  aspect-ratio: 4 / 5;
  background-color: #ebe7dc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a857a;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.art-card .meta {
  padding: 14px 16px;
}
.art-card .meta .title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.art-card .meta .sub {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: #6a6a5a;
}

/* ===== ART PROJECT DETAIL PAGE ===== */
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a5a;
  text-decoration: none;
  margin-bottom: 32px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.project-back:hover { color: #1a1a1a; border-bottom-color: #1a1a1a; }
.project-back .arrow { font-weight: 400; }

/* PROJECT DETAIL PAGE — Split Layout (left text, right image) */
.project-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 10px;
  color: #1a1a1a;
}
.project-info {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6a6a5a;
  margin-bottom: 24px;
}
.project-info em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #1a1a1a;
  font-size: 12px;
  margin: 0 2px;
}
.project-skills {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1a1a1a;
  margin-top: 24px;
}
.project-skills .label {
  display: block;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.project-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .project-split { grid-template-columns: 1fr; gap: 32px; }
}
.project-split .project-text {
  max-width: 480px;
}
.project-split .project-image img,
.project-split .project-image video {
  display: block;
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.project-split .project-image video.tool-output-video {
  width: 100%;
  max-width: 100%;
  max-height: min(95vh, 1000px);
  margin: 0 auto;
}

.project-body { margin-top: 32px; }
.project-body p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 700px;
}
.project-body p strong { font-weight: 600; }

.project-media {
  margin: 32px 0;
}
.project-media img,
.project-media video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  margin: 0 auto;
  border-radius: 4px;
}
.project-media .caption {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  color: #6a6a5a;
}

.series-description {
  margin-top: 8px;
  max-width: 480px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: #4a4a3a;
}
.series-description em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  color: #1a1a1a;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid #d8d3c5;
  padding: 32px 40px;
  margin-top: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6a6a5a;
}
.site-footer a { color: #1a1a1a; text-decoration: none; border-bottom: 1px solid #d8d3c5; }
@media (max-width: 720px) { .site-footer { padding: 24px 20px; } }

/* ===== SHOWREEL SIDE LAYOUT ===== */
.showreel-side-caption {
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a3a;
  margin: -16px 0 96px 0;
}
.showreel-side-block {
  margin-bottom: 28px;
}
.showreel-side-block:last-child { margin-bottom: 0; }
.showreel-side-block .tool-section-label {
  margin-bottom: 12px;
}
.showreel-side-text {
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  margin: 0;
}
.showreel-side-text a {
  color: #1a1a1a;
  border-bottom: 1px solid #d8d3c5;
  text-decoration: none;
}
.showreel-side-text a:hover { border-bottom-color: #1a1a1a; }

/* ===== TOOLING ===== */
.tool-feed {
  display: grid;
  gap: 56px;
  margin-top: 16px;
}
.tool-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid #d8d3c5;
  padding-top: 56px;
  transition: transform 0.3s ease;
}
.tool-card:first-child { border-top: none; padding-top: 0; }
.tool-card:hover { transform: translateY(-2px); }
.tool-card-image {
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  background-color: #f5f3ee;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tool-card-image video {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.tool-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tool-card-image.natural {
  aspect-ratio: auto;
  display: block;
  height: auto;
}
.tool-card-image.natural img {
  width: 100%;
  height: auto;
  object-fit: initial;
}

.tool-mode {
  margin: 56px 0;
}
.tool-mode-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.tool-mode-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
.tool-mode-description {
  font-size: 15px;
  line-height: 1.65;
  color: #4a4a3a;
  margin: 0;
}
.tool-card-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tool-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.tool-card-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: #4a4a3a;
  margin: 0;
}
.tool-card-cta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.tool-card-cta::after { content: ' →'; }

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.tech-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border: 1px solid #d8d3c5;
  border-radius: 100px;
  color: #4a4a3a;
}

.tool-back {
  font-size: 13px;
  color: #6a6a5a;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
}
.tool-back:hover { color: #1a1a1a; }
.tool-back::before { content: '← '; }

.tool-description {
  font-size: 16px;
  line-height: 1.7;
  color: #4a4a3a;
  margin: 0 0 8px 0;
}

.tool-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a857a;
  margin-bottom: 16px;
}

.tool-demo, .tool-tutorial {
  margin: 56px 0;
}
.tool-demo-video {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: min(70vh, 640px);
  background: transparent;
  border-radius: 2px;
}
.tool-tutorial-video {
  width: 100%;
  height: auto;
  background: transparent;
  border-radius: 2px;
  display: block;
}

.tool-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 24px 0 56px;
}
.tool-gallery.single {
  grid-template-columns: minmax(0, 400px);
}
.tool-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  background: #ece8db;
}
.tool-gallery figcaption {
  font-size: 12px;
  color: #6a6a5a;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .tool-card { grid-template-columns: 1fr; gap: 20px; padding-top: 40px; }
  .tool-feed { gap: 40px; }
  .tool-gallery { grid-template-columns: 1fr; gap: 16px; margin: 40px 0; }
  .tool-demo, .tool-tutorial { margin: 40px 0; }
}
