/* ============================================================
   Tyas Septiani - Portfolio Stylesheet
   Strictly adapted from reference (refren-tya.jpeg) and CSV request:
   - Palette: Putih #ffffff, Marun #630000, Red Cherry #810100, warm cream #eae0d2.
   - Hero:
     * "PORTFOLIO" giant, spanning full width across the top.
     * "TYAS" & "SEPTIANI" directly below it with italic serif font
       (Playfair Display Italic, strictly matching DARINA SIDOR).
     * Cutout portrait centered in front, head rising into the text.
     * Stacked "UX/UI WEB DESIGNER" on the left below TYAS.
   - About Me:
     * Marun #630000 card.
     * White capsule pill with vector SVG icons from thesvg.org.
     * 7x8 mosaic grid with scattered/random missing cells ("ngacak tapi tidak terlalu banyak").
   ============================================================ */

:root {
  /* Requested Palette from CSV & Reference */
  --white: #ffffff;
  --maroon: #630000;
  --red-cherry: #810100;

  /* Poster background matching refren-tya.jpeg */
  --cream: #eae0d2;
  --cream-2: #ded2c0;
  --cream-card: #f6ece0;
  --cream-stroke: #f6ecd7;
  --maroon-deep: #380000;
  --maroon-soft: #8f0e0c;
  --ink: #1a0304;
  --ink-muted: #5e4648;
  --rule: rgba(99, 0, 0, 0.16);
  --rule-strong: rgba(99, 0, 0, 0.3);

  /* Typography: Display condensed for PORTFOLIO, flared italic serif for TYAS SEPTIANI, clean for body */
  --display: "Bebas Neue", "Anton", "Arial Narrow", "Impact", sans-serif;
  --serif-name: "Playfair Display", "Didot", "Bodoni MT", Georgia, serif;
  --font-clean: "Mograph", "Methane", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: var(--font-clean);

  --wrap: 1140px;
  --pad: clamp(1.2rem, 4.5vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

section[id],
main[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--maroon); color: #ffffff; }

:focus-visible {
  outline: 2px solid var(--red-cherry);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.8rem 1.2rem;
  background: var(--maroon);
  color: #ffffff;
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(234, 224, 210, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding-block: 0.65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif-name);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--maroon);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.8rem);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.24s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 12px;
  width: 100%;
  height: 2px;
  background: var(--maroon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav a:hover { color: var(--maroon); }
.nav a:hover::after { transform: scaleX(1); }

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1.3rem;
  background: var(--maroon);
  color: #ffffff;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.26s, transform 0.26s var(--ease);
}

.header-cta:hover {
  background: var(--red-cherry);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   HERO SECTION (Strictly match refren-tya.jpeg)
   ------------------------------------------------------------ */
.hero {
  padding-top: clamp(0.4rem, 1.5vw, 1.2rem);
  padding-bottom: 0;
  overflow: hidden;
  background: var(--cream);
  position: relative;
}

.hero-stage {
  position: relative;
  min-height: clamp(560px, 66vw, 840px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-inline: 0;
}

/* Background giant typography: z-index: 1 (behind photo) */
.hero-backdrop-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
  width: 100%;
}

/* MY PORTFOLIO: Spasi pepet (tight tracking) membentang penuh edge-to-edge */
.hero-word-portfolio {
  width: 100%;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(4.8rem, 21.6vw, 21rem);
  line-height: 0.82;
  letter-spacing: -0.015em;
  color: var(--maroon);
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
  transform: scaleX(1.23);
  transform-origin: center;
}

/* TYAS SEPTIANI langsung tumpang-tindih memotong bagian bawah PORTFOLIO membentang penuh */
.hero-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-inline: clamp(0.5rem, 2.5vw, 2.5rem);
  margin: clamp(-2.2rem, -6vw, -6vw) 0 0 0;
  position: relative;
  z-index: 2;
}

.hero-name-part {
  font-family: var(--serif-name);
  font-style: italic;
  font-weight: 900;
  line-height: 0.95;
  color: var(--maroon);
  text-transform: uppercase;
  -webkit-text-stroke: clamp(2.2px, 0.32vw, 4px) var(--cream-stroke);
  paint-order: stroke fill;
  text-shadow: 0 0 2px rgba(246, 236, 215, 0.8);
}

.hero-name-first {
  font-size: clamp(2.6rem, 8.5vw, 7.5rem);
  letter-spacing: 0.04em;
}

.hero-name-last {
  font-size: clamp(2.2rem, 7vw, 6.2rem);
  letter-spacing: -0.02em;
}

/* Cutout portrait centered in front: z-index: 3 */
.hero-photo {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: clamp(340px, 46vw, 560px);
  height: auto;
  max-height: clamp(520px, 66vw, 760px);
  margin: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-photo img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: contrast(1.03) saturate(1.02);
  display: block;
}

/* UX/UI WEB DESIGNER di posisi kiri bawah sejajar referensi: z-index: 4 */
.hero-role {
  position: absolute;
  z-index: 4;
  left: clamp(1rem, 3.2vw, 2.5rem);
  bottom: clamp(1.4rem, 3.5vw, 3.2rem);
  font-family: var(--font-clean);
  font-weight: 900;
  font-size: clamp(1.4rem, 3.2vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

.role-line {
  display: block;
}

.role-accent {
  color: var(--maroon);
}

/* ------------------------------------------------------------
   ABOUT ME SECTION (Marun #630000 Card + Kemampuan + Mosaic)
   ------------------------------------------------------------ */
.about {
  background: var(--maroon);
  color: #ffffff;
  padding: 0;
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 540px;
  align-items: stretch;
  width: 100%;
}

/* Left: Copywriting + Skills Pill */
.about-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.2rem, 3.5vw, 3rem);
}

.about-content-inner {
  width: 100%;
  max-width: 540px;
}

.about-heading {
  margin: 0 0 1.4rem;
  font-family: var(--font-clean);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
}

.about-lead {
  margin: 0 0 1rem;
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.68;
  color: #ffffff;
}

.about-lead strong {
  color: #ffdede;
  font-weight: 700;
}

.about-paragraphs p {
  margin: 0 0 0.95rem;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
}

.about-quote {
  margin: 1.4rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--red-cherry);
  font-style: italic;
  font-size: 0.92rem;
  color: #ffffff;
  line-height: 1.6;
}

/* Skills inside About Me (Sesuai CSV) */
.about-skills-block {
  margin-top: clamp(1.8rem, 3.5vw, 2.5rem);
}

.about-skills-title {
  margin: 0 0 0.95rem;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.skills-grid-csv {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-category-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  backdrop-filter: blur(4px);
}

.skill-cat-title {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffdede;
  margin-bottom: 0.45rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.26rem 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.skill-tag.skill-highlight {
  background: #ffffff;
  color: var(--maroon);
  font-weight: 700;
  border-color: #ffffff;
}

.skills-tools-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 0.4rem;
}

.skills-tools-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}

/* White Pill Capsule with SVG Icons from thesvg.org */
.skill-capsule {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 0.9rem);
  padding: 0.42rem 1.15rem;
  background: var(--white);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  flex-wrap: wrap;
}

.capsule-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #2b2b2b;
  transition: transform 0.22s var(--ease), color 0.22s;
  cursor: default;
}

.capsule-item svg {
  width: 19px;
  height: 19px;
}

.capsule-item:hover {
  color: var(--red-cherry);
  transform: scale(1.2);
}

/* Right: Mosaic Checkerboard Photo (Proporsional, foto center top tidak ngezoom, dengan shadow di bawahnya) */
.about-visual {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

.mosaic-frame {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 100%;
  height: 100%;
  min-height: 480px;
  background-image: url("assets/tyas.jpeg");
  background-size: cover;
  background-position: center top;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.mosaic-cell {
  border: 1px solid rgba(0, 0, 0, 0.28);
  transition: background-color 0.25s var(--ease);
  position: relative;
  z-index: 1;
}

.mosaic-cell.is-solid {
  background-color: var(--maroon);
}

/* ------------------------------------------------------------
   MY EXPERIENCE SECTION (Card Grid)
   ------------------------------------------------------------ */
.experience,
.works {
  background: var(--cream-2);
  border-block: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.sec-title {
  margin: 0 0 clamp(1.8rem, 3.5vw, 2.6rem);
  font-family: var(--font-clean);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--maroon);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.25rem;
}

.work-card {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 20px -12px rgba(99, 0, 0, 0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -16px rgba(99, 0, 0, 0.35);
}

.work-card-media {
  height: 175px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
}

.media-theme-dark {
  background: linear-gradient(135deg, #1b0103, #450308);
  color: #ffffff;
}

.media-theme-cream {
  background: linear-gradient(135deg, #f7efe2, #ebdcc7);
  color: var(--ink);
}

.media-theme-rose {
  background: linear-gradient(135deg, #fae9e9, #edc6c6);
  color: var(--maroon-deep);
}

.media-theme-maroon {
  background: linear-gradient(135deg, var(--maroon), #350000);
  color: #ffffff;
}

.work-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.15rem 0.55rem;
  background: var(--red-cherry);
  color: #ffffff;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}

.media-theme-maroon .work-badge {
  background: #ffffff;
  color: var(--maroon);
}

.work-mockup-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.mockup-tag {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.mockup-meta {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.work-card-body {
  padding: 1.25rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-year {
  display: inline-block;
  padding: 0.1rem 0.48rem;
  background: var(--maroon);
  color: #ffffff;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  align-self: flex-start;
  border-radius: 2px;
}

.work-card-body h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ink);
}

.work-role {
  margin: 0 0 0.5rem !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-cherry) !important;
  font-weight: 700;
}

.work-card-body p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.62;
  color: var(--ink-muted);
}

/* Works Foot Links */
.works-foot {
  margin-top: 2rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.works-link-row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.foot-label {
  font-weight: 700;
  color: var(--maroon);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.works-link-row a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  transition: color 0.2s;
}

.works-link-row a:hover { color: var(--red-cherry); }

/* Education History */
.edu-row {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 0.7fr);
  gap: clamp(0.8rem, 3vw, 2.4rem);
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--maroon);
}

.edu-title {
  margin: 0;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
}

.edu-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.edu-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}

.edu-year {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-cherry);
  font-weight: 700;
  min-width: 9rem;
}

.edu-name {
  font-size: 0.92rem;
  color: var(--ink);
}

/* ------------------------------------------------------------
   CONTACTS SECTION (Marun #630000 Block)
   ------------------------------------------------------------ */
.contact {
  background: var(--maroon);
  color: #ffffff;
  padding-block: clamp(3rem, 6vw, 4.8rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-title {
  margin: 0;
  font-family: var(--font-clean);
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.contact-icon {
  display: inline-grid;
  place-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #ffffff;
  transition: background 0.2s;
}

.contact-icon svg { width: 18px; height: 18px; }

.contact-list a {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  border-bottom: 1px solid transparent;
  transition: border-color 0.24s, color 0.24s;
  word-break: break-word;
}

.contact-list a:hover {
  border-bottom-color: #ffffff;
  color: #ffdede;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--maroon-deep);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 1.2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-inner p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------
   RESPONSIVE LAYOUT
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .about-content {
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 3.5vw, 2.5rem);
  }
  .about-visual {
    width: 100%;
    min-height: 380px;
    height: 460px;
  }
  .mosaic-frame {
    width: 100%;
    height: 100%;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .edu-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .hero-stage { min-height: clamp(480px, 80vw, 600px); padding-inline: 0.5rem; }
  .hero-word-portfolio { font-size: clamp(4.2rem, 18.5vw, 7.8rem); }
  .hero-name-row { margin-top: clamp(-1rem, -4vw, -2.2rem); padding-inline: 0.5rem; }
  .hero-name-part {
    -webkit-text-stroke: clamp(1.6px, 0.28vw, 2.6px) var(--cream-stroke);
  }
  .hero-name-first { font-size: clamp(2rem, 7.8vw, 3.8rem); }
  .hero-name-last { font-size: clamp(1.65rem, 6.4vw, 3.2rem); }
  .hero-photo {
    width: min(84%, 380px);
    max-height: 480px;
  }
  .hero-role {
    bottom: 0.8rem;
    left: 0.8rem;
    font-size: clamp(1.15rem, 4vw, 1.5rem);
  }
}

@media (max-width: 620px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 0.1rem 0.9rem;
    font-size: 0.68rem;
    border-top: 1px solid var(--rule);
    padding-top: 0.2rem;
  }

  .nav a { min-height: 38px; }
  .header-cta { margin-left: auto; font-size: 0.65rem; padding: 0 1rem; }

  .edu-year { min-width: 0; }
  .edu-list li { flex-direction: column; gap: 0.05rem; }

  .skills-grid-csv { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-stage { min-height: 420px; }
  .hero-word-portfolio {
    font-size: clamp(2.4rem, 13vw, 4.2rem);
    transform: none;
  }
  .hero-name-row {
    padding-inline: 0.25rem;
    margin-top: -0.6rem;
  }
  .hero-name-first { font-size: clamp(1.6rem, 7vw, 2.5rem); }
  .hero-name-last { font-size: clamp(1.35rem, 5.8vw, 2.1rem); }
  .hero-photo { width: min(92%, 340px); max-height: 420px; }
  .hero-role { font-size: 1.05rem; bottom: 0.5rem; left: 0.5rem; }

  .about-visual {
    height: auto;
    min-height: 280px;
    aspect-ratio: 1;
  }

  .skill-capsule {
    border-radius: 20px;
    padding: 0.45rem 0.85rem;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 360px) {
  :root {
    --pad: 0.85rem;
  }

  .brand { font-size: 0.92rem; }

  .nav {
    gap: 0.1rem 0.5rem;
    font-size: 0.62rem;
  }

  .hero-stage { min-height: 380px; }
  .hero-word-portfolio { font-size: 2.1rem; }
  .hero-name-first { font-size: 1.4rem; }
  .hero-name-last { font-size: 1.2rem; }
  .hero-role { font-size: 0.92rem; }

  .about-heading { font-size: 1.65rem; }
  .about-content { padding-inline: 0.75rem; }

  .contact-title { font-size: 1.8rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-stage { min-height: 340px; }
  .hero-photo { max-height: 300px; }
  .hero-word-portfolio { font-size: clamp(2.5rem, 12vw, 4rem); transform: none; }
  .hero-name-row { margin-top: -0.5rem; }
}
