/* ============================================
   System Developer Portfolio — dark IDE aesthetic
   ============================================ */

:root {
  /* พื้นหลังแบบ GitHub / VS Code dark */
  --bg-base: #0d1117;
  --bg-surface: #161b22;
  --bg-raised: #21262d;
  --bg-hover: #30363d;
  --border-default: #30363d;
  --border-muted: rgba(240, 246, 252, 0.1);
  /* สีเน้นแบบ syntax highlighting */
  --accent: #58a6ff;
  --accent-bright: #79c0ff;
  --accent-dim: rgba(88, 166, 255, 0.12);
  --accent-rgb: 88, 166, 255;
  --success: #3fb950;
  --success-rgb: 63, 185, 80;
  --warning: #d29922;
  /* ใช้ชื่อเดิมเพื่อความเข้ากันกับโค้ดเดิม */
  --navy: var(--bg-base);
  --deep: var(--bg-surface);
  --navy-rgb: 13, 17, 23;
  --deep-rgb: 22, 27, 34;
  --gold: var(--accent);
  --gold-light: var(--accent-bright);
  --gold-rgb: 88, 166, 255;
  --accent-blue-rgb: 45, 120, 190;
  --cream: #f0f6fc;
  --white: #f0f6fc;
  --text-primary: #e6edf3;
  --text-body: rgba(230, 237, 243, 0.92);
  --text-muted: #8b949e;
  --gray: var(--text-muted);
  --surface: rgba(240, 246, 252, 0.04);
  --border-subtle: var(--border-muted);
  --gold-border: rgba(var(--accent-rgb), 0.22);
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-nav: 0 1px 0 rgba(240, 246, 252, 0.05);
  --shadow-glow: 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 8px 32px rgba(0, 0, 0, 0.35);
  --font-sans: "Noto Sans Thai", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-display: "Noto Sans Thai", system-ui, sans-serif;
  --font-label: var(--font-mono);
  --space-header: 4.25rem;
}

html {
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-header);
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background:
    radial-gradient(ellipse 100% 60% at 100% 0%, rgba(var(--accent-rgb), 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(var(--success-rgb), 0.05) 0%, transparent 45%),
    var(--bg-base);
  color: var(--text-body);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: var(--bg-base);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* ----- NAV ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  animation: fadeDown 0.65s ease both;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  min-height: 3.75rem;
  background: rgba(var(--navy-rgb), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  box-shadow: var(--shadow-nav);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-logo__prompt {
  color: var(--success);
  font-weight: 600;
  margin-right: 0.15rem;
}

.nav-logo__tld {
  color: var(--accent-bright);
}

.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
  padding: 0.4rem 0;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--accent-bright);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-default);
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--accent-bright);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

/* ----- HERO ----- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(5.5rem + var(--space-header)) clamp(1.5rem, 5vw, 4rem) 3rem clamp(1.5rem, 6vw, 5rem);
  position: relative;
  z-index: 2;
}

.hero-prompt {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  margin-bottom: 1.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  max-width: max-content;
  animation: fadeUp 0.9s 0.05s ease both;
}

.hero-prompt__user {
  color: var(--success);
}

.hero-prompt__at {
  color: var(--text-muted);
}

.hero-prompt__host {
  color: var(--accent-bright);
}

.hero-prompt__path {
  color: var(--warning);
}

.hero-prompt__sym {
  color: var(--success);
  font-weight: 600;
}

.hero-prompt__cmd {
  color: var(--text-primary);
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.2vw, 0.76rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  animation: fadeUp 1s 0.15s ease both;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  animation: fadeUp 1s 0.25s ease both;
  margin-bottom: 0.5rem;
}

.hero-name span {
  color: var(--accent-bright);
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.4vw, 0.88rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s 0.35s ease both;
}

.hero-divider {
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  margin-bottom: 1.5rem;
  animation: expandWidth 1s 0.45s ease both;
}

.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 0.98rem);
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 28rem;
  animation: fadeUp 1s 0.5s ease both;
  margin-bottom: 1.75rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  animation: fadeUp 1s 0.6s ease both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg-base);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1rem, 4vw, 2rem);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(var(--accent-rgb), 0.12) 0%, transparent 50%),
    linear-gradient(145deg, rgba(var(--success-rgb), 0.06) 0%, transparent 55%);
}

.photo-frame {
  position: relative;
  width: min(360px, 88vw);
  aspect-ratio: 380 / 480;
  max-height: min(460px, 68vh);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-default);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.15),
    0 16px 48px rgba(0, 0, 0, 0.45);
  animation: fadeUp 1s 0.35s ease both;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: relative;
  z-index: 0;
  filter: grayscale(10%) contrast(1.04);
}

.photo-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(22, 27, 34, 0.92);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  z-index: 2;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(8px);
}

.photo-badge .yrs {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  color: var(--success);
  display: inline;
  line-height: 1;
}

.photo-badge .yrs-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-muted);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.bg-number {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 600;
  color: rgba(var(--accent-rgb), 0.04);
  right: 0;
  bottom: -2rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

/* ----- SECTIONS ----- */
section {
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  text-transform: none;
  margin-bottom: 0.6rem;
}

.section-label::before {
  content: "// ";
  color: var(--text-muted);
}

.section-label--empty {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.section-label--empty::before {
  content: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-line {
  width: 2.5rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  margin-bottom: 2rem;
}

.section-line--center {
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

/* ----- STATS ----- */
.stats-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat-item {
  text-align: center;
  padding: clamp(1.25rem, 3vw, 1.85rem) 0.65rem;
  background: var(--bg-surface);
  transition: background 0.25s;
}

.stat-item:hover {
  background: var(--bg-raised);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-bright);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
  display: block;
  text-transform: uppercase;
}

/* ----- ABOUT ----- */
.about-section {
  background: var(--bg-base);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.about-info p {
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.info-list {
  list-style: none;
  margin-top: 1.5rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.info-list li {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) 1fr;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-default);
  font-size: 0.875rem;
  align-items: start;
  background: var(--bg-surface);
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list li span:first-child {
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-list li span:last-child {
  color: var(--text-body);
  word-break: break-word;
}

.edu-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-default);
}

.edu-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.edu-body h3 {
  font-size: 0.93rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.edu-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.expertise-block {
  margin-top: 2rem;
}

.expertise-block .section-label {
  margin-bottom: 0.75rem;
}

/* ----- SKILLS ----- */
.skills-section {
  background: var(--bg-surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-card {
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  position: relative;
  border-radius: var(--radius-sm);
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--success));
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.skill-icon {
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
  opacity: 0.9;
}

.skill-card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  padding: 0.28rem 0.5rem;
  background: var(--bg-raised);
  color: var(--accent-bright);
  border: 1px solid var(--border-default);
  letter-spacing: 0.02em;
  border-radius: 4px;
}

/* ----- EXPERIENCE ----- */
.exp-section {
  background: var(--bg-base);
}

.exp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.exp-spacer-title {
  visibility: hidden;
  user-select: none;
  pointer-events: none;
}

.timeline {
  position: relative;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(var(--success-rgb), 0.4));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--bg-base);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--success);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.timeline-org {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-highlight {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--accent);
}

.card-highlight .section-label {
  margin-bottom: 0.75rem;
}

.card-highlight h3 {
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-highlight p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.card-muted {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--border-default);
  background: var(--bg-raised);
  border-radius: var(--radius-md);
}

.card-muted .section-label {
  margin-bottom: 0.75rem;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cert-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.cert-item::before {
  content: ">";
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.cert-item p:first-of-type {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
  color: var(--text-primary);
}

.cert-item p:last-of-type {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ----- PROJECTS ----- */
.projects-section {
  background: var(--bg-surface);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-card {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--border-default);
  background: var(--bg-base);
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-radius: var(--radius-sm);
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: translateX(4px);
}

.project-num {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: rgba(var(--accent-rgb), 0.35);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2rem;
}

.project-body h3 {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.project-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ----- CONTACT ----- */
.contact-section {
  background: var(--bg-base);
  text-align: center;
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
}

.contact-inner {
  max-width: 34rem;
  margin: 0 auto;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0 0;
  text-align: left;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  transition: border-color 0.25s, background 0.25s;
  border-radius: var(--radius-sm);
}

.contact-row:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: var(--bg-raised);
}

.contact-row-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.contact-row-info label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--success);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.contact-row-info span {
  font-size: 0.88rem;
  color: var(--text-body);
  word-break: break-word;
}

/* ----- FOOTER ----- */
.site-footer {
  background: var(--bg-surface);
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.site-footer span {
  color: var(--accent-bright);
}

/* ----- REVEAL ----- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ----- ANIMATIONS ----- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 3rem;
  }
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exp-layout {
    grid-template-columns: 1fr;
  }

  .exp-column-secondary .section-label:first-child {
    display: none;
  }

  .exp-spacer-title {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 300px);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 5rem 1.75rem 2rem;
    background: rgba(var(--navy-rgb), 0.98);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--border-default);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border-default);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 0.8rem;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(1, 4, 9, 0.65);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding-top: calc(4.5rem + var(--space-header));
    order: 1;
  }

  .hero-right {
    order: 2;
    padding-bottom: 2.5rem;
    justify-content: center;
  }

  .photo-frame {
    max-height: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bg-number {
    font-size: clamp(4rem, 32vw, 10rem);
  }
}

@media (max-width: 520px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-right: none;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .info-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 901px) {
  .nav-backdrop {
    display: none;
  }
}
