/* ===========================
   TOKENS
   =========================== */
:root {
  --bg: #f5f3ee;
  --bg-warm: #ede9e1;
  --ink: #0f0e0b;
  --ink-soft: #3a3832;
  --ink-muted: #8a8679;
  --accent: #d4460e;
  --accent-light: rgba(212, 70, 14, 0.1);
  --line: rgba(15, 14, 11, 0.12);
  --card-bg: #ffffff;
  --mono: "DM Mono", "JetBrains Mono", monospace;
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
  --radius: 4px;
}

/* ===========================
   BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Hide native cursor only on desktop where custom cursor is enabled */
@media (min-width: 901px) and (pointer: fine) and (hover: hover) {
  html,
  body,
  *,
  *::before,
  *::after {
    cursor: none !important;
  }
}

/* 3D tilt prep for cards */
.skill-block, .gh-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
  opacity: 0.45;
  z-index: 999;
}

a { color: inherit; }

strong { font-weight: 500; }

.container {
  width: min(1240px, 94vw);
  margin-inline: auto;
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 2rem;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.brand-dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active { color: var(--ink); }

.nav-cta {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--bg);
  background: var(--ink);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--accent); }

/* ===========================
   HERO
   =========================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: start;
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--bg-warm);
  border: 1px solid var(--line);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 0 0 1.2rem;
  color: var(--ink);
}

.hero-role {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}

.hero-bio {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-fill {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}

.btn-fill:hover { background: var(--accent); border-color: var(--accent); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-line:hover { border-color: var(--ink); }

/* terminal */
.terminal-block {
  background: #1a1915;
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.83rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  margin-bottom: 1.2rem;
}

.terminal-bar {
  background: #242320;
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #444;
}

.terminal-bar span:nth-child(1) { background: #ff5f56; }
.terminal-bar span:nth-child(2) { background: #ffbd2e; }
.terminal-bar span:nth-child(3) { background: #27c93f; }

.terminal-title {
  margin-left: auto;
  font-size: 0.72rem;
  color: #555;
  font-family: var(--mono);
  background: transparent !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
}

.terminal-body {
  padding: 1.1rem 1.1rem 1.3rem;
  color: #c4c2bb;
  line-height: 1.9;
  overflow-x: auto;
}

.terminal-body p {
  margin: 0;
  white-space: nowrap;
}

.t-prompt { color: #d4460e; margin-right: 0.4rem; }
.t-cmd { color: #f5f0e6; }
.t-out { color: #9c9a94; padding-left: 1.2rem; }
.t-green { color: #6ee7a0 !important; }

.t-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  padding-left: 0 !important;
  line-height: 1 !important;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-tags span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: var(--bg-warm);
  border: 1px solid var(--line);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

/* ===========================
   SECTION SHARED
   =========================== */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 1.2rem;
  color: var(--ink);
}

.section-sub {
  font-size: 1rem;
  color: var(--ink-muted);
  margin: 0 0 2.5rem;
  max-width: 66ch;
}

/* ===========================
   ABOUT
   =========================== */
.about-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-body h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.about-text p {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 68ch;
}

.about-text strong { color: var(--ink); }

.about-facts {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  flex-direction: column;
}

.fact-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -1px;
}

.fact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ===========================
   SKILLS
   =========================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.skill-block {
  padding: 1.8rem 1.6rem;
  border-right: 1px solid var(--line);
  transition: background 0.2s;
}

.skill-block:last-child { border-right: none; }

.skill-block:hover { background: var(--bg-warm); }

.skill-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.skill-icon svg { width: 20px; height: 20px; }

.skill-block h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.2px;
}

.skill-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-block ul li {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ===========================
   PROJECTS
   =========================== */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.project-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
}

.project-item:last-child { border-bottom: none; }

.project-item:hover { background: var(--bg-warm); }

.project-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 1.6rem 0 1.6rem 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  padding-top: 1.75rem;
}

.project-body {
  padding: 1.4rem 1.6rem;
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.project-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
  letter-spacing: -0.2px;
}

.project-body p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.55;
}

.project-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.project-tags span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  background: var(--bg-warm);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

/* ===========================
   EXPERIENCE
   =========================== */
.section-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Keep CV content in the wide right column */
#experience .section-label {
  grid-column: 1;
  grid-row: 1;
}

#experience .section-title {
  grid-column: 2;
  grid-row: 1;
}

#experience .timeline {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

#experience .tl-content {
  max-width: none;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-item {
  display: grid;
  grid-template-columns: clamp(130px, 14vw, 180px) minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.tl-item:last-child { border-bottom: none; }

.tl-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

.tl-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.tl-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #16a34a;
  background: #dcfce7;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.03em;
  width: fit-content;
}

.tl-content {
  max-width: 74ch;
}

.tl-content h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.2px;
  line-height: 1.35;
}

.tl-content h3 span {
  font-weight: 400;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.tl-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tl-content ul li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 1rem;
  position: relative;
  line-height: 1.65;
  hyphens: auto;
}

.tl-content p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ===========================
   CONTACT
   =========================== */
.contact-inner {
  text-align: left;
}

.contact-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  letter-spacing: -2px !important;
  margin-bottom: 0.75rem !important;
}

.contact-grid {
  margin-top: 2rem;
  max-width: 600px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
}

.contact-link:last-child { border-bottom: none; }

.contact-link:not(.contact-link--plain):hover { background: var(--bg-warm); }

.contact-link-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-link-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  flex: 1;
}

.contact-arrow {
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.contact-link:hover .contact-arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  padding: 1.6rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--ink); }

.footer-copy {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ===========================
   ANIMATIONS & EFFECTS
   =========================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero stagger on load */
.hero-left > * {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.status-pill  { animation-delay: 0.05s; }
.hero h1      { animation-delay: 0.15s; }
.hero-role    { animation-delay: 0.25s; }
.hero-bio     { animation-delay: 0.33s; }
.hero-actions { animation-delay: 0.41s; }

.hero-right {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
  transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.reveal.visible .skill-block,
.reveal.visible .gh-card,
.reveal.visible .project-item,
.reveal.visible .tl-item {
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.reveal.visible .skill-block:nth-child(1),.reveal.visible .gh-card:nth-child(1),.reveal.visible .project-item:nth-child(1),.reveal.visible .tl-item:nth-child(1) { animation-delay: 0.05s; }
.reveal.visible .skill-block:nth-child(2),.reveal.visible .gh-card:nth-child(2),.reveal.visible .project-item:nth-child(2),.reveal.visible .tl-item:nth-child(2) { animation-delay: 0.12s; }
.reveal.visible .skill-block:nth-child(3),.reveal.visible .gh-card:nth-child(3),.reveal.visible .project-item:nth-child(3),.reveal.visible .tl-item:nth-child(3) { animation-delay: 0.19s; }
.reveal.visible .skill-block:nth-child(4),.reveal.visible .project-item:nth-child(4),.reveal.visible .tl-item:nth-child(4) { animation-delay: 0.26s; }
.reveal.visible .project-item:nth-child(5) { animation-delay: 0.33s; }

/* Section label slide in from left */
.section-label {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
}
.reveal.visible .section-label { opacity: 1; transform: translateX(0); }

/* Nav animated underline */
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav a:hover::after,
.nav a.active::after { width: 100%; }

/* Buttons: lift + shimmer */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }
.btn-fill:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(212,70,14,0.25); }
.btn-line:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

/* Terminal typewriter */
.t-green {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typewriter 0.7s steps(30, end) 1.1s forwards;
}
.t-comment { color: #5a584f !important; font-style: italic; }
@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

/* Project item: left accent bar sweep */
.project-item { position: relative; }
.project-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-item:hover::before { transform: scaleY(1); }

/* Skill icon fills on hover */
.skill-icon { transition: background 0.2s, color 0.2s; }
.skill-block:hover .skill-icon { background: var(--accent); color: #fff; }

/* Contact link: bottom accent line */
.contact-link { position: relative; overflow: hidden; }
.contact-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.contact-link:not(.contact-link--plain):hover::after { width: 100%; }

/* Status dot ripple ring */
.status-dot { position: relative; }
.status-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid #22c55e;
  animation: ripple 2s ease-out infinite;
}
@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* nav-cta micro lift */
.nav-cta { transition: background 0.2s, transform 0.15s; }
.nav-cta:hover { transform: translateY(-1px); }

/* GH card lift */
.gh-card { transition: background 0.18s, transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s; }
.gh-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.07); }

/* ===========================
   GITHUB CARDS
   =========================== */
.gh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}

.gh-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s;
}

.gh-card:hover { background: var(--bg-warm); }

.gh-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.gh-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.gh-icon svg { width: 17px; height: 17px; }

.gh-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  justify-content: space-between;
  padding-left: 0.6rem;
}

.gh-repo {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.3;
}

.gh-repo strong {
  color: var(--ink);
  font-weight: 500;
  display: block;
  font-size: 0.88rem;
}

.gh-ext {
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.gh-card:hover .gh-ext {
  transform: translate(2px, -2px);
  color: var(--accent);
}

.gh-desc {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
  flex: 1;
}

.gh-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.gh-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.gh-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gh-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  background: var(--bg-warm);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

.subsection-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.2px;
  color: var(--ink-muted);
  margin: 2.5rem 0 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Desktop & Large devices */
@media (min-width: 1280px) {
  .container { width: min(1360px, 94vw); }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 5.5rem;
  }

  .about-inner,
  .section-inner {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 4.5rem;
  }

  .tl-item {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 2.2rem;
  }
}

/* Tablet & Medium devices */
@media (max-width: 900px) {
  .container { width: min(720px, 95vw); }

  .site-header { border-bottom: 1px solid var(--line); }
  .nav-wrap { gap: 1rem; }
  .nav { gap: 1.2rem; }
  .nav a { font-size: 0.8rem; }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4.5rem 0 3rem;
  }

  .hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
  .hero-bio { font-size: 0.95rem; }

  .terminal-block { margin-bottom: 1.5rem; font-size: 0.75rem; }
  .terminal-body { padding: 0.8rem 0.85rem 1rem; line-height: 1.7; }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .skill-block:nth-child(2) { border-right: none; border-bottom: 1px solid var(--line); }
  .skill-block:nth-child(3) { border-right: none; border-bottom: 1px solid var(--line); }
  .skill-block:nth-child(4) { border-right: none; }
  .skill-block:nth-child(1),
  .skill-block:nth-child(2) { border-bottom: 1px solid var(--line); }
  .skill-block { padding: 1.4rem; }
  .skill-block h3 { font-size: 0.9rem; }
  .skill-block ul li { font-size: 0.75rem; }

  .about-inner,
  .section-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #experience .section-inner {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  #experience .section-label,
  #experience .section-title,
  #experience .timeline {
    grid-column: auto;
    grid-row: auto;
  }

  #experience .tl-item {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.25rem 0;
  }

  .section-label { margin-bottom: 0.8rem; }
  .section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
  .section-sub { font-size: 0.95rem; margin-bottom: 2rem; }

  .project-item {
    grid-template-columns: 50px 1fr;
  }

  .project-num {
    font-size: 0.65rem;
    padding: 1.2rem 0 1.2rem 1rem;
    padding-top: 1.4rem;
  }

  .project-body { padding: 1.2rem 1.2rem; }
  .project-body h3 { font-size: 0.95rem; }
  .project-body p { font-size: 0.85rem; }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }

  #experience .tl-item {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.25rem 0;
  }

  .tl-date { font-size: 0.7rem; }
  .tl-content h3 { font-size: 0.95rem; }
  .tl-content h3 span { font-size: 0.82rem; }
  .tl-content ul li {
    font-size: 0.84rem;
    line-height: 1.55;
    hyphens: none;
  }

  .gh-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .gh-card { padding: 1.2rem; }
  .gh-desc { font-size: 0.8rem; }
  .gh-repo { font-size: 0.72rem; }

  .contact-link { gap: 0.8rem; padding: 0.9rem 1.2rem; }
  .contact-link-label { min-width: 60px; font-size: 0.7rem; }
  .contact-link-value { font-size: 0.9rem; }

  .about-facts {
    flex-direction: column;
    gap: 1.2rem;
    flex-wrap: nowrap;
  }

  .fact-num { font-size: 1.8rem; }
  .fact-label { font-size: 0.65rem; }

  .footer-inner { flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
  .footer-nav { gap: 1rem; }
}

/* Small & Mobile devices */
@media (max-width: 640px) {
  :root {
    --radius: 3px;
  }

  .container { width: min(100vw, 95vw); padding: 0 1rem; }

  /* Header & Nav */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(245, 243, 238, 0.95);
    border-bottom: 1px solid var(--line);
  }

  .nav-wrap {
    min-height: 56px;
    gap: 1rem;
    padding: 0 1rem;
  }

  .brand { font-size: 1.1rem; }
  .nav { display: none; }
  .nav-cta { display: none; }

  /* Hero adjustments */
  .hero {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 5.5rem 0 2.5rem;
    border-bottom: 1px solid var(--line);
  }

  main { margin-top: 0; }

  .status-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
    margin-bottom: 0.8rem;
    letter-spacing: -1.5px;
  }

  .hero-role {
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
  }

  .hero-bio {
    font-size: 0.9rem;
    max-width: 100%;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }

  .terminal-block {
    background: #1a1915;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.7rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    margin-bottom: 1rem;
  }

  .terminal-body {
    padding: 0.7rem 0.8rem 0.9rem;
    line-height: 1.6;
    font-size: 0.65rem;
  }

  .terminal-body p { white-space: nowrap; overflow-x: auto; }

  .hero-tags {
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  .hero-tags span {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
  }

  /* Sections */
  .section {
    padding: 3.5rem 0;
  }

  .section-label {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
  }

  .section-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 0.8rem;
    line-height: 1.1;
  }

  .section-sub {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }

  /* About section */
  .about-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-body h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    margin-bottom: 1rem;
    line-height: 1.15;
  }

  .about-text p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .about-facts {
    flex-direction: row;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
  }

  .fact {
    flex: 1;
    min-width: 100px;
  }

  .fact-num {
    font-size: 1.6rem;
    line-height: 1;
  }

  .fact-label {
    font-size: 0.6rem;
    margin-top: 0.2rem;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1px;
    overflow: hidden;
  }

  .skill-block {
    padding: 1.2rem;
    border-right: none !important;
    border-bottom: 1px solid var(--line);
  }

  .skill-block:last-child { border-bottom: none; }
  .skill-block:nth-child(n) { border-bottom: 1px solid var(--line); }
  .skill-block:last-child { border-bottom: none; }

  .skill-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.8rem;
  }

  .skill-icon svg { width: 16px; height: 16px; }

  .skill-block h3 {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
  }

  .skill-block ul li {
    font-size: 0.7rem;
    line-height: 1.4;
  }

  /* Projects */
  .project-list {
    border-radius: 4px;
    overflow: hidden;
  }

  .project-item {
    grid-template-columns: 40px 1fr;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-item:last-child { border-bottom: none; }

  .project-num {
    font-size: 0.6rem;
    padding: 1rem 0 1rem 0.8rem;
    border-right: 1px solid var(--line);
    padding-top: 1.1rem;
  }

  .project-body {
    padding: 1rem 1rem;
  }

  .project-header {
    gap: 0.5rem;
    margin-bottom: 0.3rem;
  }

  .project-body h3 {
    font-size: 0.85rem;
    margin: 0;
  }

  .project-body p {
    font-size: 0.8rem;
    margin-top: 0.4rem;
    color: var(--ink-muted);
  }

  .project-tags span {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
  }

  /* GitHub cards */
  .gh-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .gh-card {
    padding: 1rem;
    gap: 0.6rem;
  }

  .gh-card-top {
    gap: 0.4rem;
  }

  .gh-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .gh-icon svg { width: 14px; height: 14px; }

  .gh-meta {
    gap: 0.3rem;
    padding-left: 0.4rem;
  }

  .gh-repo {
    font-size: 0.65rem;
  }

  .gh-repo strong {
    font-size: 0.75rem;
  }

  .gh-ext {
    width: 12px;
    height: 12px;
  }

  .gh-desc {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .gh-footer {
    gap: 0.4rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
  }

  .gh-tag {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }

  .gh-lang {
    font-size: 0.65rem;
  }

  .gh-lang-dot {
    width: 8px;
    height: 8px;
  }

  .subsection-title {
    font-size: 0.7rem;
    margin: 1.8rem 0 0;
  }

  /* Experience */
  #experience .section-label,
  #experience .section-title,
  #experience .timeline {
    grid-column: auto;
    grid-row: auto;
  }

  .section-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .container { width: 100%; }

  .site-header { border-bottom: 1px solid var(--line); }

  .nav-wrap {
    min-height: 52px;
    gap: 0.8rem;
    padding: 0 0.8rem;
  }

  .brand { font-size: 0.95rem; }

  .hero {
    gap: 1.5rem;
    padding: 5rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
  }

  .hero-role { font-size: 0.7rem; }
  .hero-bio { font-size: 0.85rem; }

  .terminal-block { font-size: 0.65rem; }
  .terminal-body { font-size: 0.6rem; padding: 0.6rem; }

  .section { padding: 2.5rem 0; }
  .section-title { font-size: 1.3rem; }
  .section-sub { font-size: 0.85rem; }

  .skill-block { padding: 1rem; }
  .skill-block h3 { font-size: 0.8rem; }
  .skill-block ul li { font-size: 0.65rem; }

  .project-num { padding-left: 0.6rem; font-size: 0.55rem; }
  .project-body { padding: 0.8rem; }
  .project-body h3 { font-size: 0.8rem; }
  .project-body p { font-size: 0.75rem; }

  .gh-card { padding: 0.8rem; gap: 0.5rem; }
  .gh-desc { font-size: 0.7rem; }

  .contact-link { padding: 0.8rem; }
  .contact-link-value { font-size: 0.8rem; }

  .fact {
    flex: 1;
    min-width: 80px;
  }

  .fact-num { font-size: 1.4rem; }
}

