/* ============================================
   BRUTALIST TECHNICAL PORTFOLIO — BLACK & WHITE
   Ikbar Faiz — Data Workflows & Reproducible Systems
   ============================================ */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --grid-max: 1200px;
  --grid-pad: 24px;
  --shadow-hard: 8px 8px 0 0 var(--white);
  --shadow-card: 6px 6px 0 0 var(--white);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* --- Typography Helpers --- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.display {
  font-family: var(--font-display);
  line-height: 0.85;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* --- Status --- */
.status-available { color: var(--white); font-weight: 500; }
.status-completed { color: var(--black); }
.status-active { color: var(--gray-300); }

/* ============================================
   NAVIGATION — FLOATING
   ============================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 48px);
  max-width: calc(var(--grid-max) + 48px);
  z-index: 200;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  animation: navIn 0.4s ease 0.5s both;
}

@keyframes navIn {
  from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.nav-inner {
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 calc(var(--grid-pad) + 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  line-height: 1;
}

.nav-brand-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  line-height: 1;
}

.nav-brand-role {
  font-size: 0.65rem;
  color: var(--gray-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.7rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

.nav-link:hover { color: var(--white); }

.nav-divider { color: var(--gray-700); font-size: 0.7rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 48px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  pointer-events: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  pointer-events: none;
}

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  background: rgba(0,0,0,0.98);
  border: 1px solid var(--gray-700);
  border-radius: 12px;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.mobile-menu.active { display: block !important; }

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 16px var(--grid-pad);
}

.mobile-link {
  font-size: 0.85rem;
  color: var(--gray-300);
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-800);
  display: block;
  touch-action: manipulation;
}

.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--white); }

/* ============================================
   NAVIGATION — FLOATING
   ============================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 48px);
  max-width: calc(var(--grid-max) + 48px);
  z-index: 200;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  animation: navIn 0.4s ease 0.5s both;
}

@keyframes navIn {
  from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.hero-bg {
  position: relative;
  inset: 0;
  z-index: 0;
  height: 100vh;
  overflow: hidden;
}

/* Desktop: video visible, image hidden */
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 120vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
  display: block;
}

.hero-image-bg {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.2) 25%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.55) 60%,
    rgba(0,0,0,0.75) 75%,
    rgba(0,0,0,0.9) 88%,
    rgba(0,0,0,0.97) 96%,
    var(--black) 100%
  );
}

/* Seamless blend zone — extends below hero to merge with next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.3) 20%,
    rgba(0,0,0,0.7) 50%,
    var(--black) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Seamless blend zone — extends below hero to merge with next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.3) 20%,
    rgba(0,0,0,0.7) 50%,
    var(--black) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Seamless blend zone — extends below hero to merge with next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.5) 30%,
    rgba(0,0,0,0.85) 60%,
    var(--black) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-crop-marks {
  position: absolute;
  inset: 24px;
  z-index: 2;
  pointer-events: none;
}

.crop-mark {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(255,255,255,0.2);
  border-style: solid;
}

.crop-tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.crop-tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.crop-bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.crop-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.hero-header {
  position: relative;
  z-index: 3;
  max-width: var(--grid-max);
  width: 100%;
  margin: 0 auto;
  padding: 32px calc(var(--grid-pad) + 24px) 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hero-section-label {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-affiliation {
  text-align: right;
  color: rgba(255,255,255,0.4);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.accent-label { color: var(--white) !important; font-weight: 500; }

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--grid-max);
  width: 100%;
  margin: 0 auto;
  padding: 40px calc(var(--grid-pad) + 24px);
}

.masthead { margin-bottom: 16px; }

.masthead-line { overflow: hidden; }

.masthead-text {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  animation: mastheadIn 0.8s ease 0.5s both;
}

.masthead-line:nth-child(2) .masthead-text { animation-delay: 0.65s; }

@keyframes mastheadIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-tagline {
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-footer {
  position: relative;
  z-index: 3;
  max-width: var(--grid-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 calc(var(--grid-pad) + 24px) 40px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.08em;
}

/* ============================================
   SECTIONS — ALTERNATING BLACK/WHITE
   ============================================ */
.section {
  padding: 96px 0;
  position: relative;
  background: var(--black);
  color: var(--white);
  border-top: none;
}

/* White sections */
.section.section-white {
  background: var(--white);
  color: var(--black);
}

/* White section: borders use black */
.section.section-white .section-header {
  border-bottom-color: var(--black);
}

.section.section-white .section-footer {
  border-top-color: var(--black);
}

.section.section-white .mono {
  color: var(--gray-500);
}

.section.section-white .section-lead {
  color: var(--gray-500);
}

.section.section-white .project-featured {
  border-color: var(--black);
  box-shadow: 8px 8px 0 0 var(--black);
  background: var(--white);
}

.section.section-white .project-name {
  color: var(--black);
}

.section.section-white .project-lead {
  color: var(--gray-500);
}

.section.section-white .project-desc {
  color: var(--gray-600);
}

.section.section-white .project-meta-grid {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.section.section-white .meta-label {
  color: var(--gray-400);
}

.section.section-white .meta-value {
  color: var(--black);
}

.section.section-white .project-badge {
  background: var(--black);
  color: var(--white);
}

.section.section-white .status-completed {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.section.section-white .project-row {
  border-bottom-color: var(--gray-200);
}

.section.section-white .project-row:hover {
  background: var(--gray-100);
}

.section.section-white .project-row::before {
  background: var(--black);
}

.section.section-white .project-row-number {
  color: var(--gray-300);
}

.section.section-white .project-row-name {
  color: var(--black);
}

.section.section-white .project-row-name:hover {
  color: var(--gray-500);
}

.section.section-white .project-row-tagline {
  color: var(--gray-500);
}

.section.section-white .project-row-desc {
  color: var(--gray-500);
}

.section.section-white .tech-tag {
  border-color: var(--gray-300);
  color: var(--gray-600);
}

.section.section-white .btn-outline {
  border-color: var(--black);
  color: var(--black);
}

.section.section-white .btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.section.section-white .btn-ghost {
  color: var(--gray-500);
}

.section.section-white .btn-ghost:hover {
  color: var(--black);
}

.section.section-white .system-name {
  color: var(--black);
}

.section.section-white .system-desc {
  color: var(--gray-600);
}

.section.section-white .system-divider {
  background: var(--gray-300);
}

.section.section-white .system-details {
  border-left-color: var(--gray-300);
}

.section.section-white .detail-label {
  color: var(--gray-400);
}

.section.section-white .detail-value {
  color: var(--gray-600);
}

.section.section-white .focus-column {
  border-color: var(--black);
  box-shadow: 8px 8px 0 0 var(--black);
  background: var(--white);
}

.section.section-white .focus-title {
  color: var(--black);
}

.section.section-white .focus-number {
  color: var(--gray-300);
}

.section.section-white .focus-column p {
  color: var(--gray-500);
}

.section.section-white .about-column-title {
  border-bottom-color: var(--black);
  color: var(--black);
}

.section.section-white .about-column p {
  color: var(--gray-600);
}

.section.section-white .about-photo-circle {
  border-color: var(--black);
}

.section.section-white .repo-card {
  border-color: var(--black);
  background: var(--white);
}

.section.section-white .repo-card:hover {
  box-shadow: 8px 8px 0 0 var(--black);
}

.section.section-white .repo-name {
  color: var(--black);
}

.section.section-white .repo-lang {
  border-color: var(--gray-300);
  color: var(--gray-600);
}

.section.section-white .repo-desc {
  color: var(--gray-500);
}

.section.section-white .repo-card-meta {
  border-top-color: var(--gray-200);
  color: var(--gray-400);
}

.section.section-white .section-headline {
  color: var(--black);
}

.section.section-white .about-text .section-headline {
  color: var(--black);
}

.section.section-white .about-layout {
  border-color: var(--black);
}

.section.section-white .about-photo-circle {
  border-color: var(--black);
}

/* White sections */
.section.section-white {
  background: var(--white);
  color: var(--black);
}

/* White section: borders use black */
.section.section-white .section-header {
  border-bottom-color: var(--black);
}

.section.section-white .section-footer {
  border-top-color: var(--black);
}

.section.section-white .mono {
  color: var(--gray-500);
}

.section.section-white .section-lead {
  color: var(--gray-500);
}

.section.section-white .project-featured {
  border-color: var(--black);
  box-shadow: 8px 8px 0 0 var(--black);
  background: var(--white);
}

.section.section-white .project-name {
  color: var(--black);
}

.section.section-white .project-lead {
  color: var(--gray-500);
}

.section.section-white .project-desc {
  color: var(--gray-600);
}

.section.section-white .project-meta-grid {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.section.section-white .meta-label {
  color: var(--gray-400);
}

.section.section-white .meta-value {
  color: var(--black);
}

.section.section-white .project-badge {
  background: var(--black);
  color: var(--white);
}

.section.section-white .status-completed {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.section.section-white .project-row {
  border-bottom-color: var(--gray-200);
}

.section.section-white .project-row:hover {
  background: var(--gray-100);
}

.section.section-white .project-row::before {
  background: var(--black);
}

.section.section-white .project-row-number {
  color: var(--gray-300);
}

.section.section-white .project-row-name {
  color: var(--black);
}

.section.section-white .project-row-name:hover {
  color: var(--gray-500);
}

.section.section-white .project-row-tagline {
  color: var(--gray-500);
}

.section.section-white .project-row-desc {
  color: var(--gray-500);
}

.section.section-white .tech-tag {
  border-color: var(--gray-300);
  color: var(--gray-600);
}

.section.section-white .btn-outline {
  border-color: var(--black);
  color: var(--black);
}

.section.section-white .btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.section.section-white .btn-ghost {
  color: var(--gray-500);
}

.section.section-white .btn-ghost:hover {
  color: var(--black);
}

.section.section-white .system-name {
  color: var(--black);
}

.section.section-white .system-desc {
  color: var(--gray-600);
}

.section.section-white .system-divider {
  background: var(--gray-300);
}

.section.section-white .system-details {
  border-left-color: var(--gray-300);
}

.section.section-white .detail-label {
  color: var(--gray-400);
}

.section.section-white .detail-value {
  color: var(--gray-600);
}

.section.section-white .focus-column {
  border-color: var(--black);
  box-shadow: 8px 8px 0 0 var(--black);
  background: var(--white);
}

.section.section-white .focus-title {
  color: var(--black);
}

.section.section-white .focus-number {
  color: var(--gray-300);
}

.section.section-white .focus-column p {
  color: var(--gray-500);
}

.section.section-white .about-column-title {
  border-bottom-color: var(--black);
  color: var(--black);
}

.section.section-white .about-column p {
  color: var(--gray-600);
}

.section.section-white .about-photo-circle {
  border-color: var(--black);
}

.section.section-white .repo-card {
  border-color: var(--black);
  background: var(--white);
}

.section.section-white .repo-card:hover {
  box-shadow: 8px 8px 0 0 var(--black);
}

.section.section-white .repo-name {
  color: var(--black);
}

.section.section-white .repo-lang {
  border-color: var(--gray-300);
  color: var(--gray-600);
}

.section.section-white .repo-desc {
  color: var(--gray-500);
}

.section.section-white .repo-card-meta {
  border-top-color: var(--gray-200);
  color: var(--gray-400);
}

.section.section-white .section-headline {
  color: var(--black);
}

.section.section-white .about-text .section-headline {
  color: var(--black);
}

.section.section-white .about-layout {
  border-color: var(--black);
}

.section.section-white .about-photo-circle {
  border-color: var(--black);
}

/* Safe horizontal margins — all section content */
.section > *:not(.section-header):not(.section-footer) {
  max-width: var(--grid-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--grid-pad) + 24px);
  padding-right: calc(var(--grid-pad) + 24px);
}

.section-header,
.section-footer {
  max-width: var(--grid-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--grid-pad) + 24px);
  padding-right: calc(var(--grid-pad) + 24px);
}

/* First section after hero — seamless blend zone on top */
.section:first-of-type {
  border-top: none;
  padding-top: 120px;
}

.section:first-of-type::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(
    to bottom,
    var(--black) 0%,
    rgba(0,0,0,0.95) 15%,
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.2) 70%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

.section:first-of-type > * {
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--black);
}

.section-header {
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-700);
}

/* First section after hero — seamless blend zone on top */
.section:first-of-type {
  border-top: none;
  padding-top: 120px;
}

.section:first-of-type::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(
    to bottom,
    var(--black) 0%,
    rgba(0,0,0,0.95) 15%,
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.2) 70%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

.section:first-of-type > * {
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--black);
}

.section-header {
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-700);
}

.section-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-700);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.section-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 12px;
  color: var(--white);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--gray-400);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================
   PROJECTS / SEC-02
   ============================================ */
.projects-intro { margin-bottom: 48px; }

.project-featured {
  border: 2px solid var(--white);
  box-shadow: var(--shadow-hard);
  padding: 32px;
  margin-bottom: 48px;
  background: var(--black);
}

.project-featured-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.project-badge {
  background: var(--white);
  color: var(--black);
  padding: 3px 10px;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.project-name {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 12px;
  color: var(--white);
}

.project-lead {
  font-size: 1.05rem;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.project-desc {
  color: var(--gray-400);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 720px;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.6rem;
  color: var(--gray-500);
}

.meta-value {
  font-size: 0.8rem;
  color: var(--white);
  line-height: 1.5;
}

.project-actions {
  display: flex;
  gap: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  padding: 10px 20px;
  border: 2px solid var(--white);
  transition: all 0.2s;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

.btn-inverse {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn-inverse:hover {
  background: transparent;
  color: var(--white);
}

.btn-outline-inv {
  background: transparent;
  color: var(--white);
  border-color: var(--gray-600);
}

.btn-outline-inv:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

.btn-sm {
  font-size: 0.7rem;
  padding: 6px 14px;
}

.btn-ghost {
  border-color: transparent;
  color: var(--gray-400);
  padding: 6px 0;
}

.btn-ghost:hover { color: var(--white); }

/* --- Project Rows --- */
.project-rows {
  display: flex;
  flex-direction: column;
}

.project-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 40px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--gray-800);
  position: relative;
  transition: background 0.2s;
}

.project-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--white);
  transition: width 0.2s;
}

.project-row:hover::before { width: 3px; }
.project-row:hover { background: var(--gray-900); }

.project-row-number {
  font-size: 2.5rem;
  color: var(--gray-700);
  line-height: 1;
}

.project-row-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.project-row-name {
  font-size: 0.85rem;
  color: var(--white);
  font-weight: 500;
  transition: color 0.2s;
}

.project-row-name:hover { color: var(--gray-400); }

.project-row-tagline {
  font-size: 0.95rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.project-row-desc {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: 12px;
}

.project-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-row-action {
  margin-top: 8px;
}

.project-row-action .btn-ghost {
  padding: 4px 0;
  font-size: 0.7rem;
}

.project-row-action {
  margin-top: 8px;
}

.project-row-action .btn-ghost {
  padding: 4px 0;
  font-size: 0.7rem;
}

.tech-tag {
  font-size: 0.6rem;
  padding: 3px 8px;
  border: 1px solid var(--gray-600);
  color: var(--gray-300);
}

/* --- Status Badge --- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--gray-600);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.status-completed {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.status-active {
  background: transparent;
  border-color: var(--gray-500);
  color: var(--gray-300);
}

/* ============================================
   SYSTEMS / SEC-03
   ============================================ */
.systems-intro { margin-bottom: 48px; }

.systems-list {
  display: flex;
  flex-direction: column;
}

.system-item {
  padding: 40px 0;
}

.system-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.system-name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 8px;
  color: var(--white);
}

.system-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.system-desc {
  color: var(--gray-400);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 720px;
}

.system-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--gray-700);
}

.system-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.65rem;
  color: var(--gray-500);
}

.detail-value {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.6;
}

.system-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-divider {
  height: 1px;
  background: var(--gray-700);
}

/* ============================================
   FOCUS / SEC-04
   ============================================ */
.focus-intro { margin-bottom: 48px; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.focus-column {
  padding: 32px;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-hard);
  background: var(--black);
}

.focus-number {
  display: block;
  font-size: 2rem;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.focus-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--white);
}

.focus-column p {
  color: var(--gray-400);
  line-height: 1.7;
  font-size: 0.9rem;
}

/* ============================================
   ABOUT
   ============================================ */

.about-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 64px;
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about-text .section-headline {
  margin-bottom: 0;
}

.about-photo-circle {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--white);
}

.about-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about-column-title {
  font-size: 0.75rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-700);
  color: var(--white);
}

.about-column p {
  color: var(--gray-400);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* ============================================
   GITHUB / SEC-06
   ============================================ */
.github-intro { margin-bottom: 48px; }

.github-repos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.repo-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 2px solid var(--white);
  transition: all 0.2s;
  background: var(--black);
}

.repo-card:hover {
  box-shadow: var(--shadow-hard);
  transform: translate(-4px, -4px);
}

.repo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.repo-name {
  font-size: 0.85rem;
  color: var(--white);
  font-weight: 500;
}

.repo-lang {
  font-size: 0.6rem;
  padding: 2px 8px;
  border: 1px solid var(--gray-600);
  color: var(--gray-300);
}

.repo-desc {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.repo-card-meta {
  font-size: 0.6rem;
  color: var(--gray-500);
  padding-top: 12px;
  border-top: 1px solid var(--gray-800);
}

/* ============================================
   CONTACT / SEC-07
   ============================================ */
.contact-content {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
  font-size: 0.65rem;
}

.contact-headline {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 24px;
  color: var(--white);
}

.red-rule {
  width: 32px;
  height: 3px;
  background: var(--white);
  margin-bottom: 24px;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: var(--gray-400);
  margin-bottom: 48px;
  max-width: 560px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item-label {
  font-size: 0.65rem;
  color: var(--gray-400);
}

.contact-item-value {
  font-size: 1rem;
  color: var(--white);
  transition: color 0.2s;
}

.contact-item-value:hover { color: var(--gray-400); }

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.contact-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.contact-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  color: var(--white);
  border-top: 1px solid var(--gray-800);
  padding: 32px 0;
}

.footer-inner {
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 var(--grid-pad);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand .mono {
  font-size: 0.85rem;
  color: var(--white);
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--gray-500);
  max-width: 560px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 0.7rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

.footer-link:hover { color: var(--white); }

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--gray-500);
  padding-top: 16px;
  border-top: 1px solid var(--gray-800);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .focus-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .github-repos {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-meta-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .about-photo-circle {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .nav-inner {
    padding: 0 var(--grid-pad);
  }

  /* Hero: image instead of video on mobile */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-bg {
    height: 100vh;
    height: 100dvh;
  }

  .hero-video-bg {
    display: none;
  }

  .hero-image-bg {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .hero-header {
    flex-direction: column;
    gap: 8px;
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .hero-affiliation { text-align: left; }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }

  .hero-content {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .hero-footer {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .section { padding: 64px 0; }

  .section > *:not(.section-header):not(.section-footer),
  .section-header,
  .section-footer {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 16px;
    margin: 0 -16px;
  }

  .project-row-number {
    font-size: 1.5rem;
  }

  /* Hero: keep video + content together on mobile */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-bg {
    height: 100vh;
    height: 100dvh;
  }

  .hero-video-bg {
    width: 150vw;
    height: 150vh;
  }

  .hero-header {
    flex-direction: column;
    gap: 8px;
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .hero-affiliation { text-align: left; }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }

  .hero-content {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .hero-footer {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .section { padding: 64px 0; }

  .section > *:not(.section-header):not(.section-footer),
  .section-header,
  .section-footer {
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 16px;
    margin: 0 -16px;
  }

  .project-row-number {
    font-size: 1.5rem;
  }

  .contact-headline {
    font-size: 2.5rem;
  }

  .contact-actions {
    flex-direction: row;
  }

  .system-item-header {
    flex-direction: column;
  }

  .footer-inner {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-content { padding: 24px var(--grid-pad); }

  .masthead-text {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .project-featured { padding: 20px; }

  .contact-actions {
    flex-direction: column;
  }
}
