/* 1. Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul { margin: 0; }
body { min-height: 100vh; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { list-style: none; padding: 0; }

/* 2. Variables */
:root {
  --bg: #fafbea;
  --surface: #ffffff;
  --surface-low: #f4f5e4;
  --surface-mid: #eeefdf;
  --surface-high: #e8e9d9;
  --text: #1a1d13;
  --muted: #5f5e5e;
  --accent: #caf45d;
  --primary: #4e6700;
  --primary-soft: #dff9a1;
  --border: #c4c9b1;
  --dark: #1a1d13;
  --soft: #e2e4d4;
  --font-heading: "Josefin Sans", sans-serif;
  --font-body: "Poppins", sans-serif;
  --font-brand: "Josefin Sans", sans-serif;
  --container: 1200px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 54px rgba(26, 29, 19, 0.08);
  --transition: 220ms ease;
}

/* 3. Typography */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.12; letter-spacing: 0; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.12rem, 2vw, 1.5rem); font-weight: 400; }
p { color: var(--muted); font-weight: 400; }

/* 4. Layout */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding: 96px 0; scroll-margin-top: 88px; }
.section-head { max-width: 820px; }
.section-label {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-label::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  height: 10px;
  width: 10px;
}
.section-title { max-width: 840px; }
.section-copy { font-size: 1.12rem; line-height: 1.6; margin-top: 12px; max-width: 680px; }
.two-column { display: grid; gap: clamp(36px, 7vw, 90px); grid-template-columns: 0.85fr 1.15fr; }
.skip-link {
  background: var(--dark);
  color: #fff;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 2000;
}
.skip-link:focus { top: 16px; }

/* 5. Navbar */
.site-header {
  left: 0;
  backdrop-filter: blur(18px);
  background: rgba(250, 251, 234, 0.82);
  box-shadow: 0 1px 10px rgba(26, 29, 19, 0.04);
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  transition: var(--transition);
  z-index: 1000;
}
.site-header.scrolled {
  background: rgba(250, 251, 234, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(26, 29, 19, 0.06);
  padding: 0;
}
.nav { align-items: center; display: flex; height: 64px; justify-content: space-between; }
.brand { align-items: center; display: inline-flex; font-family: var(--font-brand); font-size: 1.28rem; font-weight: 700; gap: 10px; letter-spacing: 0; }
.brand-mark {
  align-items: center;
  background: var(--dark);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.78rem;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  width: 38px;
}
.brand-mark img {
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  width: 100%;
}
.nav-menu { align-items: center; display: flex; gap: 24px; }
.nav-links { align-items: center; display: flex; gap: 18px; }
.nav-link {
  border-radius: 8px;
  color: #444937;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  padding: 8px 10px;
  position: relative;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { background: var(--accent); color: #546f00; font-weight: 800; }
.nav-menu .nav-cta {
  border-radius: 12px;
  font-size: 0.88rem;
  min-height: 42px;
  min-width: auto;
  padding: 11px 18px;
}
.scroll-track { background: var(--soft); height: 4px; width: 100%; }
.scroll-track span { background: var(--accent); display: block; height: 100%; transition: width 120ms linear; width: 0; }
.nav-toggle { background: transparent; border: 0; display: none; height: 42px; padding: 8px; width: 42px; }
.nav-toggle span { background: var(--text); display: block; height: 2px; margin: 6px 0; transition: var(--transition); width: 24px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Buttons */
.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  font-weight: 400;
  gap: 10px;
  justify-content: center;
  font-size: 0.84rem;
  line-height: 1;
  min-height: 48px;
  padding: 14px 24px;
  transition: var(--transition);
}
.btn span { transition: transform var(--transition); }
.btn:hover span { transform: translateX(4px); }
.btn-dark {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--bg);
  box-shadow: 0 14px 34px rgba(26, 29, 19, 0.15);
}
.btn-dark:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 16px 44px rgba(78, 103, 0, 0.24);
  transform: translateY(-2px);
}
.btn-light {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-light:hover {
  border-color: var(--dark);
  box-shadow: inset 0 0 0 999px rgba(26, 29, 19, 0.04);
  transform: translateY(-2px);
}

/* 6. Hero */
.hero {
  min-height: 1780px;
  padding: 0;
  position: relative;
}
.hero-grid {
  min-height: calc(100vh - 64px);
  padding-top: 64px;
  position: sticky;
  top: 64px;
}
.hero::before {
  background: linear-gradient(135deg, rgba(202, 244, 93, 0.22), rgba(255,255,255,0));
  border-radius: 32px;
  content: "";
  height: 360px;
  position: absolute;
  right: -90px;
  top: 120px;
  transform: rotate(8deg);
  width: 360px;
}
.hero-grid { align-items: center; display: grid; gap: 64px; grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr); }
.badge {
  background: rgba(202, 244, 93, 0.42);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 32px;
  padding: 6px 12px;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; line-height: 1.12; margin-bottom: 10px; }
.hero-role { color: var(--muted); font-family: var(--font-heading); font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 400; line-height: 1.2; max-width: 820px; }
.hero-copy { color: #444937; font-size: clamp(1.05rem, 1.8vw, 1.125rem); line-height: 1.56; margin-top: 28px; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.tech-strip { border-top: 1px solid rgba(117, 121, 101, 0.25); color: var(--muted); font-size: 0.82rem; font-weight: 400; line-height: 1.8; margin-top: 32px; max-width: 680px; padding-top: 24px; }
.tech-strip span { color: #93b731; margin: 0 7px; }
.hero-visual { min-height: 570px; position: relative; transition: opacity 120ms linear, transform 120ms linear; }
.hero-visual::before {
  animation: drift 7s ease-in-out infinite;
  background:
    linear-gradient(90deg, rgba(17,17,17,0.08) 1px, transparent 1px),
    linear-gradient(rgba(17,17,17,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  border-radius: 24px;
  content: "";
  height: 76%;
  inset: 9% 4% auto auto;
  opacity: 0.5;
  position: absolute;
  width: 76%;
}
.hero-visual::before {
  animation: none;
  background: linear-gradient(135deg, rgba(202, 244, 93, 0.34), rgba(255,255,255,0));
  border-radius: 28px;
  height: 86%;
  inset: auto -26px 30px auto;
  opacity: 1;
  transform: rotate(4deg);
  width: 78%;
}
.portrait-frame {
  animation: softFloat 5.6s ease-in-out infinite;
  inset: 0;
  min-height: 570px;
  position: absolute;
}
.portrait-panel {
  background:
    linear-gradient(90deg, rgba(26,29,19,0.055) 1px, transparent 1px),
    linear-gradient(rgba(26,29,19,0.055) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px, 32px 32px, auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  bottom: 34px;
  box-shadow: var(--shadow);
  left: 26px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 26px;
}
.portrait-panel::before {
  background: var(--accent);
  bottom: -70px;
  content: "";
  height: 210px;
  left: -42px;
  opacity: 0.9;
  position: absolute;
  transform: rotate(-10deg);
  width: 130%;
}
.portrait-panel::after {
  border: 1px solid rgba(26, 29, 19, 0.08);
  border-radius: 24px;
  content: "";
  inset: 22px;
  position: absolute;
}
.hero-portrait {
  animation: portraitIn 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  bottom: 28px;
  filter: drop-shadow(0 28px 42px rgba(26, 29, 19, 0.22));
  height: min(82%, 500px);
  left: 50%;
  object-fit: contain;
  position: absolute;
  transform: translateX(-50%);
  width: auto;
  z-index: 2;
}
.portrait-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(26, 29, 19, 0.09);
  min-width: 172px;
  padding: 14px 16px;
  position: absolute;
  z-index: 3;
}
.portrait-card span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portrait-card strong {
  color: var(--text);
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.2;
  margin-top: 3px;
}
/* Reference-style banner redesign */
.hero {
  background:
    radial-gradient(circle at -4% 54%, rgba(202, 244, 93, 0.14) 0 12%, transparent 12.5%),
    radial-gradient(circle at 92% 8%, rgba(202, 244, 93, 0.13) 0 13%, transparent 13.5%),
    linear-gradient(180deg, #fafbea 0%, #fbfcf0 100%);
  min-height: 100vh;
  overflow: hidden;
  padding: 96px 0 46px;
}
.hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(42px, 6vw, 88px);
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.88fr);
  min-height: calc(100vh - 142px);
  padding-top: 0;
  position: relative;
  top: auto;
}
.hero::before {
  background: rgba(202, 244, 93, 0.1);
  border-radius: 42% 58% 51% 49%;
  height: 430px;
  left: auto;
  right: -210px;
  top: -90px;
  transform: none;
  width: 430px;
}
.badge {
  align-items: center;
  box-shadow: 0 8px 28px rgba(78, 103, 0, 0.08);
  color: #213000;
  font-size: clamp(0.78rem, 1.3vw, 0.96rem);
  font-weight: 400;
  margin-bottom: 28px;
  padding: 8px 17px;
}
.badge span {
  animation: pulse 1.8s infinite;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  margin-right: 12px;
  width: 9px;
}
.hero-title {
  font-size: clamp(4.1rem, 7.5vw, 6.25rem);
  font-weight: 800;
  line-height: 0.98;
  margin-bottom: 34px;
  position: relative;
}
.hero-title span,
.hero-title strong {
  display: block;
}
.hero-title strong {
  background: linear-gradient(100deg, #46c45c 0%, #1d9b32 42%, #145f00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.hero-title strong::after {
  background: rgba(202, 244, 93, 0.45);
  border-radius: 50%;
  bottom: -22px;
  content: "";
  height: 18px;
  left: 10%;
  position: absolute;
  transform: rotate(-2deg);
  width: 78%;
  z-index: -1;
}
.hero-role {
  color: #656464;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  max-width: 680px;
}
.hero-copy {
  color: #55584d;
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
  line-height: 1.35;
  margin-top: 30px;
  max-width: 760px;
}
.hero-actions {
  gap: 20px;
  margin-top: 34px;
}
.btn {
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 400;
  min-height: 60px;
  min-width: 218px;
}
.btn-dark {
  background: #101407;
  color: #ffffff;
}
.btn-dark:hover {
  background: var(--primary);
}
.btn-light {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(117, 121, 101, 0.34);
  box-shadow: 0 10px 26px rgba(26, 29, 19, 0.04);
}
.tech-strip {
  align-items: stretch;
  border-top: 0;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  margin-top: 42px;
  max-width: 800px;
  padding-top: 0;
}
.tech-strip > span {
  align-items: center;
  border-right: 1px solid rgba(117, 121, 101, 0.26);
  color: #55584d;
  display: flex;
  flex-direction: column;
  font-size: 0.86rem;
  font-weight: 400;
  gap: 8px;
  justify-content: center;
  min-height: 76px;
  text-align: center;
}
.tech-strip > span:last-child {
  border-right: 0;
}
.tech-strip i {
  align-items: center;
  background: #ffffff;
  border-radius: 50%;
  color: var(--primary);
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}
.tech-strip span:nth-child(1) i { color: #21759b; font-family: Georgia, serif; font-size: 1.65rem; }
.tech-strip span:nth-child(2) i { color: #12aeea; font-size: 1.45rem; }
.tech-strip span:nth-child(3) i { background: #101014; color: #ffffff; }
.tech-strip span:nth-child(4) i { background: transparent; color: #31438a; font-size: 1rem; font-style: italic; width: 52px; }
.tech-strip span:nth-child(5) i { color: #5f9c25; font-size: 1.5rem; }
.tech-strip span:nth-child(6) i { color: #1c6292; }
.hero-visual {
  min-height: 690px;
  overflow: visible;
}
.hero-visual::before {
  display: none;
}
.portrait-frame {
  animation: none;
  inset: 0;
  min-height: 690px;
}
.portrait-panel {
  background: linear-gradient(145deg, #e2f7a8 0%, #c9ef62 100%);
  border: 0;
  border-radius: 34% 20% 28% 18%;
  bottom: 100px;
  box-shadow: inset 0 30px 80px rgba(255,255,255,0.32), 0 34px 80px rgba(78, 103, 0, 0.16);
  left: 22%;
  right: 7%;
  top: 155px;
  transform: rotate(8deg);
}
.portrait-panel::before {
  display: none;
}
.portrait-panel::after {
  border: 0;
}
.dot-grid {
  background-image: radial-gradient(rgba(78, 103, 0, 0.22) 2px, transparent 2.5px);
  background-size: 24px 24px;
  height: 170px;
  opacity: 0.75;
  position: absolute;
  width: 190px;
  z-index: 1;
}
.dot-grid-top {
  left: 18%;
  top: 36px;
}
.dot-grid-bottom {
  bottom: 78px;
  right: 0;
}
.hero-portrait {
  bottom: 66px;
  filter: drop-shadow(0 30px 42px rgba(26, 29, 19, 0.2));
  height: min(78%, 560px);
  left: 55%;
  max-width: 82%;
  z-index: 3;
}
.portrait-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(196, 201, 177, 0.72);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(26, 29, 19, 0.11);
  color: var(--text);
  min-width: auto;
}
.portrait-card-code {
  align-items: flex-start;
  display: grid;
  gap: 22px;
  left: 4%;
  padding: 22px 26px 24px;
  top: 175px;
}
.card-icon-round,
.card-icon-plain {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}
.card-icon-round {
  background: linear-gradient(140deg, #72bd1b, #4b8f11);
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  height: 58px;
  width: 58px;
}
.portrait-card-code strong,
.portrait-card-seo strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}
.portrait-card-seo {
  right: 0;
  padding: 30px 26px;
  top: 285px;
}
.card-icon-plain {
  color: #5f9c25;
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 16px;
}
.portrait-card-score {
  align-items: center;
  bottom: 68px;
  display: flex;
  gap: 24px;
  left: 38%;
  padding: 18px 28px;
}
.portrait-card-score strong {
  color: #1e7d13;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1;
}
.portrait-card-score span {
  border-left: 1px solid rgba(117, 121, 101, 0.3);
  color: var(--muted);
  display: block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  padding-left: 24px;
  text-transform: none;
}
.hero-note {
  color: #4f514c;
  font-family: "Comic Sans MS", "Segoe Print", cursive;
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  line-height: 1.15;
  position: absolute;
  transform: rotate(-10deg);
  z-index: 4;
}
.hero-note::after {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
  display: block;
  height: 38px;
  opacity: 0.85;
  position: absolute;
  width: 26px;
}
.hero-note-top {
  right: 2%;
  top: 22px;
}
.hero-note-top::after {
  border-radius: 0 0 18px 0;
  right: 54px;
  top: 62px;
  transform: rotate(36deg);
}
.hero-note-bottom {
  bottom: 16px;
  right: 6%;
}
.hero-note-bottom::after {
  border-radius: 0 0 20px 0;
  right: 4px;
  top: 52px;
  transform: rotate(108deg);
}

/* 7. About */
.about { background: var(--surface); border-block: 1px solid rgba(196, 201, 177, 0.55); }
.about-copy p + p { margin-top: 18px; }
.stats-grid { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); margin-top: 48px; }
.stat-card { background: var(--surface-low); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: var(--transition); }
.stat-card:hover { border-color: var(--dark); transform: translateY(-3px); }
.stat-card strong { color: var(--text); display: block; font-family: var(--font-heading); font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.05; }
.stat-card span { color: var(--muted); display: block; font-weight: 700; margin-top: 8px; }

/* 8. Skills */
.skills-grid { display: grid; gap: 32px; grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 16px; padding: 32px; transition: var(--transition); }
.skill-card:nth-child(n) { grid-column: auto; }
.skill-card:hover { border-color: var(--dark); box-shadow: var(--shadow); transform: translateY(-3px); }
.skill-card h3 { margin-bottom: 18px; }
.card-icon {
  align-items: center;
  background: var(--accent);
  border-radius: 12px;
  color: #546f00;
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  letter-spacing: 0;
  margin-bottom: 2px;
  width: 48px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list span {
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1;
  padding: 7px 11px;
  transition: var(--transition);
}
.chip-list span:hover { background: var(--accent); border-color: rgba(17,17,17,0.12); transform: translateY(-2px); }

/* 9. Experience */
.experience { background: var(--surface-low); border-block: 1px solid rgba(196, 201, 177, 0.55); }
.timeline { margin-top: 42px; }
.timeline-card { border-left: 1px solid var(--border); display: grid; gap: 32px; grid-template-columns: 240px 1fr; margin-left: 16px; padding-left: 32px; position: relative; }
.timeline-card::before { background: var(--accent); border: 4px solid var(--surface-low); border-radius: 50%; content: ""; height: 18px; left: -10px; position: absolute; top: 26px; width: 18px; }
.timeline-meta { align-self: start; background: var(--surface-low); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.status-dot { animation: pulse 1.8s infinite; background: var(--accent); border-radius: 50%; display: inline-block; height: 12px; margin-right: 10px; width: 12px; }
.timeline-content { background: var(--surface-low); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(28px, 5vw, 42px); }
.timeline-content h3 { margin-bottom: 24px; }
.responsibility-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.responsibility-grid p { background: var(--surface); border: 1px solid rgba(196,201,177,0.7); border-radius: 12px; padding: 14px; }

/* 10. Projects */
.projects-head { max-width: 820px; }
.featured-grid { display: grid; gap: 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: opacity var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.project-card:hover { border-color: var(--dark); box-shadow: var(--shadow); transform: translateY(-4px); }
.project-card.hide { opacity: 0; pointer-events: none; transform: scale(0.98); }
.project-media { align-items: center; aspect-ratio: 16 / 10; background: var(--surface-low); display: flex; justify-content: center; overflow: hidden; padding: 14px; position: relative; }
.project-media::before {
  background: radial-gradient(circle at 80% 20%, rgba(202,244,93,0.35), transparent 28%), linear-gradient(90deg, rgba(78,103,0,0.08) 1px, transparent 1px);
  background-size: auto, 42px 42px;
  content: "";
  inset: 0;
  position: absolute;
}
.project-media::after {
  color: rgba(26, 29, 19, 0.68);
  content: attr(data-fallback);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-weight: 400;
  left: 26px;
  max-width: 80%;
  position: absolute;
  top: 26px;
}
.project-media img { border: 1px solid rgba(196, 201, 177, 0.65); border-radius: 12px; box-shadow: 0 18px 42px rgba(26, 29, 19, 0.08); height: 100%; object-fit: contain; object-position: center; opacity: 0; transition: transform 500ms ease, opacity var(--transition); width: 100%; }
.project-media.has-image img { opacity: 1; }
.project-media.has-image::before, .project-media.has-image::after { display: none; }
.project-card:hover img { transform: scale(1.02); }
.project-body { display: flex; flex-direction: column; gap: 12px; padding: 32px; }
.project-top { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 12px; }
.project-body h3 { max-width: 70%; }
.role-badge { border: 1px solid var(--border); border-radius: 999px; color: var(--text); flex: 0 0 auto; font-size: 0.75rem; font-weight: 400; padding: 6px 10px; }
.role-badge.developed-maintaining { background: var(--accent); border-color: transparent; }
.role-badge.developed { background: var(--dark); color: #fff; }
.industry { color: var(--text); font-weight: 400; margin-bottom: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.tag-row span { background: var(--surface-low); border-radius: 6px; color: var(--muted); font-size: 0.72rem; font-weight: 400; padding: 5px 8px; }
.project-link { align-items: center; display: inline-flex; font-weight: 400; gap: 8px; }
.project-link::after { content: "\2192"; transition: var(--transition); }
.project-link:hover::after { transform: translateX(5px); }
.compact-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 42px; }
.compact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px; transition: var(--transition); }
.compact-card:hover { border-color: rgba(17,17,17,0.24); transform: translateY(-4px); }

/* 11. Maintenance */
.maintenance { background: var(--surface-high); border-block: 1px solid var(--border); }
.maintenance-grid, .capability-grid { display: grid; gap: 32px; grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.maintenance-card, .capability-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: var(--transition); }
.maintenance-card:hover, .capability-card:hover { border-color: rgba(17,17,17,0.24); box-shadow: var(--shadow); transform: translateY(-4px); }
.maintenance-card p, .capability-card p { margin: 12px 0 18px; }
.maintenance-card a { font-weight: 400; }
.service-strip { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; padding: 20px; }
.service-strip span { background: var(--surface-low); border: 1px solid var(--border); border-radius: 999px; font-size: 0.9rem; font-weight: 400; line-height: 1; padding: 9px 13px; }

/* 12. Expertise */
.line-icon { border: 2px solid var(--text); border-radius: 16px; height: 48px; margin-bottom: 22px; position: relative; width: 48px; }
.line-icon::after { background: var(--accent); border-radius: 50%; content: ""; height: 14px; position: absolute; right: -6px; top: 8px; width: 14px; }
.line-icon.speed::before { background: var(--text); content: ""; height: 2px; left: 10px; position: absolute; top: 24px; transform: rotate(-30deg); width: 26px; }
.line-icon.infra { border-radius: 50%; }
.line-icon.support::before { border: 2px solid var(--text); border-radius: 50%; content: ""; height: 18px; left: 13px; position: absolute; top: 13px; width: 18px; }

/* 13. Contact and AI */
.ai-panel, .contact-panel {
  background: var(--surface-mid);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  overflow: hidden;
  padding: clamp(32px, 6vw, 64px);
  position: relative;
}
.ai-panel > *, .contact-panel > * { min-width: 0; }
.ai-panel::after, .contact-panel::after { background: var(--accent); border-radius: 50%; content: ""; height: 180px; opacity: 0.52; position: absolute; right: -56px; top: -56px; width: 180px; }
.ai-panel h2, .contact-panel h2 { font-size: clamp(2.15rem, 5vw, 3.5rem); position: relative; }
.ai-panel p, .contact-panel p, .ai-panel .section-label, .contact-panel .section-label { color: var(--muted); position: relative; }
.contact-panel .btn-light { background: var(--surface); border-color: var(--border); color: var(--text); }
.contact-panel .btn-light:hover { background: var(--surface-low); }
.ai-chips {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}
.ai-chips span {
  align-items: center;
  background: var(--surface);
  border-color: var(--border);
  border-radius: 999px;
  color: var(--text);
  display: flex;
  font-weight: 400;
  justify-content: center;
  line-height: 1.2;
  min-height: 58px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 12px 16px;
  text-align: center;
}
.ai-chips span:hover { color: var(--text); }
.contact-details { align-self: end; display: grid; font-style: normal; gap: 12px; position: relative; z-index: 1; }
.contact-details a, .contact-details span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
  padding: 14px 16px;
}
/* 14. Education */
.education-card { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 28px; grid-template-columns: 0.35fr 1fr auto; padding: clamp(24px, 5vw, 42px); }
.education-card p { margin-top: 8px; }

.noscript-projects {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 28px;
}
.noscript-projects a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 800;
  padding: 16px;
}

/* 15. Footer */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { align-items: center; display: flex; gap: 18px; justify-content: space-between; }
.footer p { font-size: 0.92rem; }
.back-to-top { background: var(--accent); border: 1px solid rgba(17,17,17,0.12); border-radius: 50%; color: var(--text); cursor: pointer; height: 44px; transition: var(--transition); width: 44px; }
.back-to-top:hover { background: var(--dark); color: #fff; transform: translateY(-3px); }

/* 16. Animations */
.reveal { opacity: 0; transform: translateY(18px) scale(0.99); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }
.hero .reveal:nth-child(1) { transition-delay: 80ms; }
.hero .reveal:nth-child(2) { transition-delay: 150ms; }
.hero .reveal:nth-child(3) { transition-delay: 220ms; }
.hero .reveal:nth-child(4) { transition-delay: 290ms; }
.hero .reveal:nth-child(5) { transition-delay: 360ms; }
.hero .reveal:nth-child(6) { transition-delay: 430ms; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(202, 244, 93, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(202, 244, 93, 0); }
}
@keyframes softFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}
@keyframes pillLift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes rotateOrbit {
  to { transform: rotate(360deg); }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-12px, 8px, 0); }
}
@keyframes portraitIn {
  from { opacity: 0; transform: translateX(-50%) translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 17. Responsive styles */
@media (max-width: 1024px) {
  .hero { min-height: auto; padding: 112px 0 76px; }
  .hero-grid { min-height: auto; padding-top: 0; position: relative; top: auto; }
  .hero-grid, .two-column, .timeline-card, .ai-panel, .contact-panel { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(3.8rem, 11vw, 5.4rem); }
  .hero-visual { min-height: 660px; }
  .hero-note-top { right: 7%; }
  .portrait-card-seo { right: 8%; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-head { align-items: flex-start; flex-direction: column; gap: 26px; }
  .stats-grid, .compact-grid { grid-template-columns: repeat(2, 1fr); }
  .maintenance-grid, .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .education-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; position: relative; z-index: 1002; }
  .nav-menu {
    align-items: stretch;
    background: rgba(250,251,234,0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 24px;
    left: 0;
    opacity: 0;
    padding: 92px 20px 26px;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateY(-10px);
    transition: var(--transition);
  }
  .nav-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links { align-items: stretch; flex-direction: column; gap: 8px; }
  .nav-link { display: block; font-size: 1.2rem; padding: 10px 0; }
  .nav-cta { width: 100%; }
  body.menu-open { overflow: hidden; }
  .featured-grid, .responsibility-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 32px, var(--container)); }
  .section { padding: 72px 0; }
  .hero { padding: 104px 0 64px; }
  .hero::before { display: none; }
  .hero-title { font-size: clamp(3.15rem, 17vw, 4.45rem); margin-bottom: 24px; }
  .hero-title strong::after { bottom: -14px; height: 12px; }
  .hero-role { font-size: clamp(1.58rem, 8vw, 2.2rem); }
  .hero-copy { font-size: 1rem; line-height: 1.48; margin-top: 22px; }
  .tech-strip { grid-template-columns: repeat(3, minmax(82px, 1fr)); margin-top: 32px; }
  .tech-strip > span { border-bottom: 1px solid rgba(117, 121, 101, 0.18); min-height: 72px; }
  .tech-strip > span:nth-child(3n) { border-right: 0; }
  .hero-visual { min-height: 560px; margin-top: 10px; }
  .portrait-frame { min-height: 560px; }
  .portrait-panel { bottom: 86px; left: 11%; right: 3%; top: 118px; }
  .hero-portrait { bottom: 70px; height: min(72%, 390px); left: 55%; max-width: 88%; }
  .dot-grid { height: 120px; width: 130px; }
  .dot-grid-top { left: 4%; top: 20px; }
  .dot-grid-bottom { bottom: 70px; right: 2%; }
  .hero-note { display: none; }
  .portrait-card { border-radius: 18px; padding: 14px 16px; }
  .portrait-card-code { left: 0; top: 70px; }
  .card-icon-round { height: 44px; width: 44px; }
  .portrait-card-code strong,
  .portrait-card-seo strong { font-size: 1rem; }
  .portrait-card-seo { padding: 16px; right: 0; top: 214px; }
  .card-icon-plain { font-size: 2rem; margin-bottom: 8px; }
  .portrait-card-score { bottom: 20px; gap: 14px; left: 6%; right: 6%; padding: 14px 18px; }
  .portrait-card-score strong { font-size: 1.8rem; }
  .portrait-card-score span { font-size: 0.86rem; padding-left: 14px; }
  .stats-grid, .skills-grid, .maintenance-grid, .capability-grid, .compact-grid { grid-template-columns: 1fr; }
  .noscript-projects { grid-template-columns: 1fr; }
  .skill-card:nth-child(n) { grid-column: auto; }
  .hero-actions .btn { width: 100%; }
  .ai-chips { grid-template-columns: 1fr; }
  .project-top { flex-direction: column; }
  .project-body h3 { max-width: none; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

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