/* ============================================
   DESIGN SYSTEM — Warm Dark Portfolio
   Inspired by the noah./Sammy reference design
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Palette — warm dark with orange accent */
  --bg-primary: hsl(15, 20%, 5%);
  --bg-secondary: hsl(15, 18%, 7%);
  --bg-card: hsla(15, 15%, 12%, .6);
  --bg-card-solid: hsl(15, 15%, 12%);
  --bg-card-hover: hsl(15, 15%, 16%);
  --surface: hsl(15, 12%, 14%);
  --border: hsla(20, 15%, 25%, .4);
  --border-light: hsla(20, 15%, 30%, .5);

  --text-primary: hsl(30, 30%, 95%);
  --text-secondary: hsl(20, 12%, 62%);
  --text-muted: hsl(20, 10%, 58%);

  --accent: hsl(20, 95%, 55%);
  --accent-hover: hsl(20, 95%, 60%);
  --accent-dim: hsl(20, 70%, 40%);
  --accent-glow: hsla(20, 100%, 55%, .30);
  --accent-bg: hsla(20, 100%, 55%, .10);

  --warm-red: hsl(0, 75%, 55%);
  --warm-amber: hsl(35, 100%, 55%);
  --warm-brown: hsl(15, 40%, 18%);

  --gradient-accent: linear-gradient(135deg, var(--accent), var(--warm-amber));
  --gradient-warm: linear-gradient(135deg, hsla(20, 95%, 55%, .12), hsla(35, 100%, 55%, .06));
  --gradient-bg: radial-gradient(ellipse at 70% 40%, hsla(20, 70%, 15%, .4) 0%, transparent 60%);

  /* Glass */
  --glass-bg: hsla(15, 15%, 12%, .45);
  --glass-border: hsla(20, 20%, 30%, .25);
  --glass-blur: blur(20px) saturate(1.4);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --container: 1200px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 100px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --duration: 300ms;
}

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

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: .88rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: top .2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

#main:focus {
  outline: none;
}

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section-padding {
  padding: 110px 0;
}

.mono {
  font-family: var(--font-mono);
}

.accent-text {
  color: var(--accent);
}

/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: var(--accent-bg);
  border: 1px solid hsla(20, 100%, 55%, .12);
  border-radius: var(--radius-pill);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   NAVIGATION — Centered pill style
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: padding var(--duration) var(--ease);
}

.navbar.scrolled {
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-logo .logo-bracket {
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Centered pill nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 5px 6px;
}

.nav-links a {
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all var(--duration) var(--ease);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}

/* CTA button in nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: .88rem;
  transition: all var(--duration) var(--ease);
}

.nav-cta i {
  font-size: 1.1rem;
  color: var(--accent);
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--duration) var(--ease);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 90px;
}

/* hero::before provides subtle edge fading */
.hero .container {
  /* Two-zone grid: left = text content, right = visual artwork space */
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-content {
  /* Fill the left grid cell — no artificial max-width cap */
  grid-column: 1;
  max-width: 580px;
  position: relative;
  z-index: 2;
  padding-right: 32px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent-bg);
  border: 1px solid hsla(20, 100%, 55%, .15);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .2;
  }
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 52px;
}

/* Buttons — pill style */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .92rem;
  transition: all var(--duration) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}

/* Stats row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.stat-item {
  position: relative;
  padding-left: 16px;
}

.stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
}

.stat-item .stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-item .stat-label {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Hero artwork: full-composition reference artwork ── */
.hero picture {
  display: contents;
}

.hero-artwork {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: right bottom;
  z-index: 0;
  pointer-events: none;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%), linear-gradient(to right, transparent 0%, #000 25%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%), linear-gradient(to right, transparent 0%, #000 25%);
  mask-composite: intersect;
}

/* Layered gradient overlay — z-index 1, sits between artwork(0) and content(2) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* Protect left text readability while leaving full artwork visible */
    linear-gradient(to right,
      var(--bg-primary) 0%,
      hsla(15, 20%, 5%, .80) 25%,
      transparent 42%),
    /* BOTTOM FADE — blends artwork into the next section */
    linear-gradient(to top,
      var(--bg-primary) 0%,
      transparent 10%);
}





/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  background: var(--bg-secondary);
  position: relative;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  font-size: .88rem;
  font-weight: 600;
  transition: all var(--duration) var(--ease);
}

.highlight-item:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}

.highlight-item .hi-icon {
  font-size: 1.3rem;
}

/* Terminal card — glass style */
.terminal-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px hsla(0, 0%, 0%, .4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: hsla(15, 12%, 14%, .5);
  border-bottom: 1px solid var(--glass-border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: hsl(0, 70%, 55%);
}

.terminal-dot.yellow {
  background: hsl(40, 80%, 55%);
}

.terminal-dot.green {
  background: hsl(120, 50%, 50%);
}

.terminal-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: .84rem;
  line-height: 2;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .command {
  color: var(--text-primary);
}

.terminal-body .output {
  color: var(--text-muted);
}

.terminal-body .string {
  color: hsl(120, 55%, 55%);
}

.terminal-body .keyword {
  color: var(--warm-amber);
}

.cursor {
  display: inline-block;
  width: .6ch;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursor-blink 1.2s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 30px;
  transition: all var(--duration) var(--ease);
}

.skill-category:hover {
  transform: translateY(-4px);
  border-color: hsla(20, 100%, 55%, .3);
  box-shadow: 0 16px 48px hsla(20, 100%, 40%, .08);
  background: hsla(15, 15%, 12%, .7);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.skill-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--accent-bg);
  border: 1px solid hsla(20, 100%, 55%, .12);
}

.skill-cat-title {
  font-size: 1.1rem;
  font-weight: 700;
}

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

.skill-tag {
  padding: 8px 18px;
  background: hsla(15, 12%, 18%, .7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
#projects {
  background: var(--bg-secondary);
  position: relative;
}

#projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px var(--accent-glow);
}

/* Banner container — 232px high */
.project-image {
  height: 232px;
  position: relative;
  overflow: hidden;
  background: #120d0b;
}

/* Wazuh banner image & chips */
.project-banner-img {
  width: 100%;
  height: 232px;
  object-fit: cover;
  object-position: left top;
  display: block;
}

.project-image-wazuh::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, hsla(15, 20%, 5%, .75) 0%, transparent 45%);
}

.project-image-chips {
  position: absolute;
  bottom: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.img-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px hsla(0, 0%, 0%, .45);
}

.chip-accent {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
}

.chip-dark {
  background: hsla(15, 20%, 7%, .92);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  backdrop-filter: blur(8px);
}

/* Terminal-style banner for Ansible */
.project-image-terminal {
  background: #120d0b;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.terminal-banner-bar {
  height: 34px;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: hsla(15, 18%, 9%, .95);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.terminal-banner-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-banner-dots .terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-banner-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.terminal-banner-body {
  padding: 10px 14px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.48;
  color: var(--text-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.term-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-key {
  color: var(--text-muted);
}

.term-accent {
  color: var(--accent);
  font-weight: 600;
}

/* Project card content body */
.project-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.project-description {
  font-size: .92rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.65;
}

/* Bullet list with accent marker */
.project-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-bullets li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.project-bullets li::before {
  content: '▸';
  color: var(--accent);
  font-size: 14px;
  line-height: 1.5;
  flex-shrink: 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tech span {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: .74rem;
  font-weight: 600;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid hsla(20, 100%, 55%, .12);
}

/* Action buttons pinned to bottom */
.project-links {
  margin-top: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.btn-project-primary {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all var(--duration) var(--ease);
  border: 1.5px solid transparent;
}

.btn-project-primary svg {
  transition: transform var(--duration) var(--ease);
}

.btn-project-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-project-primary:hover svg {
  transform: translate(2px, -2px);
}

.btn-project-outline {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
  font-weight: 600;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--duration) var(--ease);
}

.btn-project-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--warm-amber), transparent);
  border-radius: 2px;
}

.timeline-item {
  padding-left: 44px;
  position: relative;
  margin-bottom: 52px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  margin-bottom: 8px;
  display: inline-flex;
  padding: 4px 14px;
  background: var(--accent-bg);
  border-radius: var(--radius-pill);
  border: 1px solid hsla(20, 100%, 55%, .1);
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  margin-top: 8px;
}

.timeline-company {
  font-size: .92rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.timeline-description {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.timeline-description li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.timeline-description li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
  background: var(--bg-secondary);
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

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

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration) var(--ease);
}

.contact-channel:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  background: var(--accent-bg);
}

.contact-channel .cc-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  font-size: 1.2rem;
  color: var(--accent);
}

.contact-channel .cc-label {
  font-size: .8rem;
  color: var(--text-muted);
}

.contact-channel .cc-value {
  font-weight: 600;
  font-size: .94rem;
}

/* Contact Form — glass */
.contact-form {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 36px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: hsla(15, 12%, 10%, .6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: .94rem;
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-submit {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.form-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

#formStatus {
  margin-top: 16px;
  font-size: .92rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--duration) var(--ease);
}

#formStatus.success {
  color: hsl(150, 60%, 45%);
}

#formStatus.error {
  color: var(--warm-red);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: .86rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-3px);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .project-card:hover,
  .btn-project-primary:hover,
  .btn-project-outline:hover {
    transform: none !important;
  }
}

/* ============================================
   BACKGROUND — subtle warm grid
   ============================================ */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(hsla(20, 12%, 18%, .10) 1px, transparent 1px),
    linear-gradient(90deg, hsla(20, 12%, 18%, .10) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 30%, transparent 100%);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ── Tablet landscape / small desktop (≤ 960px) ── */
@media (max-width: 960px) {

  /* Vertical stack: text content first, character below buttons and stats */
  .hero {
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 88px;
    padding-bottom: 24px;
  }

  /* Foreground content: sits cleanly as top item */
  .hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
    grid-template-columns: 1fr;
    padding-top: 15px;
    padding-bottom: 0;
    order: 1;
  }

  .hero-content {
    grid-column: 1;
    max-width: 560px;
    text-align: left;
    padding-right: 0;
  }

  .hero-description {
    margin: 0 0 28px 0;
    max-width: 480px;
  }

  .hero-actions {
    justify-content: flex-start;
    margin-bottom: 32px;
  }

  .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
  }

  /* Keep picture transparent in flex flow at order: 2 */
  .hero picture {
    display: contents;
  }

  /* Normal block below text, buttons and stats */
  .hero-artwork {
    position: static;
    width: 100%;
    height: auto;
    opacity: 1;
    max-width: 520px;
    margin: 24px auto 0;
    object-fit: contain;
    display: block;
    order: 2;
    z-index: 2;
    padding: 0 18px;
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
    -webkit-mask-composite: initial;
    mask-composite: initial;
  }

  /* Short fade at the bottom into the About section */
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: block;
    background: linear-gradient(
      to top,
      var(--bg-primary) 0%,
      transparent 8%
    );
  }

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

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

/* ── Tablet portrait (≤ 768px) ── */
@media (max-width: 768px) {
  .section-padding {
    padding: 80px 0;
  }

  .nav-links {
    display: none;
    background: hsla(15, 20%, 8%, .96);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    padding: 16px;
    gap: 4px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 48px hsla(0, 0%, 0%, .5);
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 20px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
  }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .section-padding {
    padding: 55px 0;
  }

  .container {
    padding: 0 18px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  .btn {
    padding: 12px 22px;
    font-size: .86rem;
  }

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

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

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
  }

  .stat-item {
    padding-left: 10px;
  }

  .stat-item .stat-value {
    font-size: 1.45rem;
  }

  .stat-item .stat-label {
    font-size: .70rem;
    line-height: 1.25;
  }

  .project-body {
    padding: 24px 20px 24px;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
  }

  .btn-project-primary,
  .btn-project-outline {
    width: 100%;
    text-align: center;
  }
}

/* ── Fix for Chrome "Desktop Site" on Portrait Phones & Vertical Viewports ── */
@media (min-width: 961px) and (orientation: portrait) {

  /* Navigation: fit comfortably without compression or wrapping */
  .navbar .container {
    padding: 0 20px;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-links {
    padding: 4px 6px;
    gap: 2px;
  }

  .nav-links a {
    font-size: .82rem;
    padding: 8px 14px;
  }

  .nav-cta {
    font-size: .82rem;
    padding: 9px 18px;
    gap: 8px;
  }

  /* Hero: follow content naturally, remove artificial tall height and empty bottom gap */
  .hero {
    min-height: auto;
    height: auto;
    padding-top: 95px;
    padding-bottom: 50px;
  }

  .hero .container {
    padding-top: 16px;
    padding-bottom: 16px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  /* Hero Content: refined proportions to fit narrow 2-column layout */
  .hero-content {
    max-width: 100%;
    padding-right: 20px;
  }

  .hero-badge {
    margin-bottom: 18px;
  }

  .hero-greeting {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .hero-title {
    font-size: clamp(2.4rem, 4.8vw, 3.2rem);
    margin-bottom: 6px;
    line-height: 1.12;
  }

  .hero-role {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }

  .hero-description {
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 440px;
  }

  .hero-actions {
    margin-bottom: 36px;
    gap: 12px;
  }

  .btn {
    padding: 12px 24px;
    font-size: .88rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-item .stat-value {
    font-size: 1.5rem;
  }

  .stat-item .stat-label {
    font-size: .75rem;
  }

  /* Artwork: vertically centered right alongside hero content, matching text height */
  .hero-artwork {
    object-fit: contain;
    object-position: right center;
    opacity: 1;
    z-index: 0;
  }

  /* Protective gradient veil over text column */
  .hero::before {
    background:
      linear-gradient(to right,
        var(--bg-primary) 0%,
        hsla(15, 20%, 5%, .85) 32%,
        transparent 48%),
      linear-gradient(to top,
        var(--bg-primary) 0%,
        transparent 8%);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .bg-grid,
  .hero-artwork,
  .nav-toggle,
  .contact-form,
  .footer-socials,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  h1, h2, h3, h4, h5, h6, p, span, li, a, td, th {
    color: #000 !important;
  }

  .reveal,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .timeline-item,
  .project-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
  }
}