/* ============================================================
   TOKENS
   ============================================================ */
:root{
  --ink:        #0B1220;   /* deep blueprint navy background */
  --panel:      #121A29;   /* slightly lifted panel bg */
  --panel-2:    #0E1622;
  --line:       rgba(150, 185, 225, 0.14);
  --line-strong:rgba(150, 185, 225, 0.30);
  --paper:      #EAF0F6;   /* primary text */
  --steel:      #8996A8;   /* secondary text */
  --cyan:       #6FB3DE;   /* technical line cyan */
  --signal:     #FF5A1F;   /* aviation safety orange */
  --signal-dim: rgba(255, 90, 31, 0.15);
  --ok:         #6FCF97;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;

  --maxw: 1180px;
}

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

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.9rem;
}
.eyebrow.center{ text-align:center; }

.section-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 2.4rem;
  letter-spacing: -0.01em;
}
.section-title.center{ text-align:center; }

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plate-id{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.plate-id-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.plate-id-sub{
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--steel);
  letter-spacing: 0.1em;
}
.topnav{ display: flex; gap: 2rem; }
.topnav a{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--steel);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.topnav a:hover{ color: var(--paper); }
.topnav a::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px;
  height:1px; background: var(--signal);
  transform: scaleX(0); transform-origin:left;
  transition: transform 0.2s ease;
}
.topnav a:hover::after{ transform: scaleX(1); }

.menu-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding: 0.4rem;
}
.menu-toggle span{
  width: 20px; height: 2px; background: var(--paper); display:block;
}

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 2rem;
  overflow: hidden;
}
.hero-grid{
  position:absolute; inset:0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, black 40%, transparent 85%);
  opacity: 0.6;
  pointer-events:none;
}
.hero-inner{ position: relative; max-width: 640px; }

.hero-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
}
.hero-tagline{
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  color: var(--cyan);
  margin: 0 0 1.3rem;
  letter-spacing: 0.01em;
}
.hero-sub{
  color: var(--steel);
  font-size: 1rem;
  max-width: 52ch;
  margin: 0 0 2.1rem;
}
.hero-actions{ display:flex; gap: 1rem; flex-wrap: wrap; }

.btn{
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-block;
}
.btn-primary{
  background: var(--signal);
  color: #14100C;
  font-weight: 600;
}
.btn-primary:hover{ background: #ff7040; }
.btn-ghost{
  border-color: var(--line-strong);
  color: var(--paper);
}
.btn-ghost:hover{ border-color: var(--cyan); color: var(--cyan); }

/* Airfoil signature graphic */
.airfoil-wrap{
  position: relative;
  margin-top: 1rem;
  width: 100%;
  max-width: 720px;
}
.airfoil-svg{ width: 100%; height: auto; }
.airfoil-body{
  fill: rgba(111, 179, 222, 0.08);
  stroke: var(--cyan);
  stroke-width: 1.5;
}
.datum-line{
  stroke: var(--steel);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.ticks line{ stroke: var(--steel); stroke-width: 1; }
.datum-label{
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--steel);
  letter-spacing: 0.08em;
  text-anchor: middle;
}
.streamlines .stream{
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 6 10;
  animation: flow 3.2s linear infinite;
}
.streamlines .stream:nth-child(2){ animation-duration: 3.8s; }
.streamlines .stream:nth-child(3){ animation-duration: 4.4s; }
.streamlines .stream:nth-child(4){ animation-duration: 3.6s; }
@keyframes flow{
  to{ stroke-dashoffset: -160; }
}

/* ============================================================
   DATUM DIVIDER (recurring signature motif)
   ============================================================ */
.datum-divider{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 1px;
  background: var(--line);
  position: relative;
  display: flex;
  justify-content: space-between;
}
.datum-tick{
  width: 1px; height: 10px;
  background: var(--line-strong);
  transform: translateY(-4.5px);
}

/* ============================================================
   STATS
   ============================================================ */
.stats{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat{
  border-left: 1px solid var(--line-strong);
  padding-left: 1rem;
}
.stat-num{
  display:block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--signal);
  line-height: 1;
}
.stat-unit{
  font-size: 1.1rem;
  color: var(--steel);
  font-weight: 500;
}
.stat-label{
  display:block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--steel);
  line-height: 1.4;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.project-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.8rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover{
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.card-featured{
  border-color: rgba(255, 90, 31, 0.4);
  background: linear-gradient(180deg, rgba(255,90,31,0.06), var(--panel) 40%);
}
.card-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  margin-bottom: 1rem;
}
.dwg{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--steel);
  letter-spacing: 0.06em;
}
.status{
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
}
.status-complete{ color: var(--ok); border-color: rgba(111,207,151,0.35); background: rgba(111,207,151,0.08); }
.status-progress{ color: var(--signal); border-color: rgba(255,90,31,0.4); background: var(--signal-dim); }

.card-icon{
  width: 40px; height: 40px;
  color: var(--cyan);
  margin-bottom: 1rem;
  opacity: 0.85;
}

.card-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}
.card-desc{
  color: var(--steel);
  font-size: 0.92rem;
  margin: 0 0 1.2rem;
}
.card-specs{
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.5rem;
}
.card-specs div{
  display:flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
}
.card-specs dt{
  font-family: var(--font-mono);
  color: var(--steel);
  flex-shrink: 0;
}
.card-specs dd{
  margin:0;
  text-align:right;
  color: var(--paper);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.skills-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.skill-block{
  border-top: 2px solid var(--cyan);
  padding-top: 1rem;
}
.skill-block h3{
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.9rem;
}
.skill-block ul{
  list-style:none;
  margin:0; padding:0;
  display:flex; flex-direction:column; gap:0.55rem;
}
.skill-block li{
  font-size: 0.85rem;
  color: var(--steel);
  padding-left: 0.9rem;
  position:relative;
}
.skill-block li::before{
  content:"";
  position:absolute; left:0; top:0.5em;
  width:5px; height:1px;
  background: var(--signal);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact{
  border-top: 1px solid var(--line);
  padding: 5rem 1.5rem 3rem;
}
.contact-inner{
  max-width: var(--maxw);
  margin: 0 auto;
}
.contact-sub{
  color: var(--steel);
  max-width: 48ch;
  margin: -1rem 0 2rem;
}
.contact-links{
  display:flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.contact-links a{
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cyan);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.contact-links a:hover{ border-color: var(--cyan); }
.footer-note{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--steel);
  opacity: 0.7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px){
  .stats{ grid-template-columns: repeat(2, 1fr); }
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .project-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .topnav{
    position: absolute;
    top: 100%; left:0; right:0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .topnav.open{ max-height: 240px; }
  .topnav a{ padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
  .menu-toggle{ display:flex; }
  .stats{ grid-template-columns: 1fr 1fr; }
  .stat{ padding-left: 0.7rem; }
}
