/* =========================================================
   VARIABLES & BASE
========================================================= */
:root {
  --bg-0: #0a0a0e;
  --bg-1: #111117;
  --bg-2: #16161f;
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .09);
  --border-hi: rgba(255, 255, 255, .18);
  --text-0: #f2efe9;
  --text-1: #b9b5c4;
  --text-2: #726e80;
  --warm: #e8a860;
  --warm-soft: #e8a86055;
  --cool: #7c7bff;
  --cool-soft: #7c7bff55;
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, #7c7bff14, transparent 60%),
    radial-gradient(900px 500px at 88% 8%, #e8a86012, transparent 55%),
    var(--bg-0);
  color: var(--text-0);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--warm-soft);
  color: var(--text-0);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   NOISE & SCRUBBER (NAVBAR)
========================================================= */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scrubber {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 6vw;
  background: rgba(10, 10, 14, .6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.scrubber-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--text-1);
  white-space: nowrap;
  margin-right: 6px;
}

.scrubber-brand b {
  color: var(--text-0);
  font-weight: 500;
}

.scrubber-track {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border-hi), var(--border));
  border-radius: 2px;
}

.scrubber-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cool), var(--warm));
  border-radius: 2px;
  transition: width .15s ease-out;
}

.scrubber-marks {
  display: flex;
  gap: 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
}

.scrubber-marks a {
  transition: color .2s ease;
  white-space: nowrap;
}

.scrubber-marks a:hover,
.scrubber-marks a:focus-visible {
  color: var(--warm);
}

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  z-index: 2;
  padding: 15vh 6vw 12vh;
  max-width: 1180px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cool);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 12px 2px var(--warm-soft);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--text-0);
  max-width: 16ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(100deg, var(--warm), var(--cool) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin-top: 28px;
  max-width: 52ch;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text-1);
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: .92rem;
  padding: 14px 26px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(100deg, var(--warm), #d99356);
  color: #1a1206;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px var(--warm-soft);
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-0);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

/* =========================================================
   SECTION & GRID
========================================================= */
.section {
  padding: 4vh 6vw 12vh;
  position: relative;
  z-index: 2;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.section-head span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: .05em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

/* =========================================================
   CARD COMPONENT
========================================================= */
.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s ease, box-shadow .35s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cool-soft), transparent 40%, var(--warm-soft));
  opacity: 0;
  transition: opacity .35s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  border-color: var(--border-hi);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.55);
}

.card:hover::before { 
  opacity: 1; 
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  letter-spacing: .04em;
}

.card-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ce38b;
  box-shadow: 0 0 8px 1px #7ce38b88;
}

.card-thumb {
  height: 150px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s ease;
}

.card:hover .card-thumb img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, #ffffff10 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .7s ease;
  pointer-events: none;
}

.card:hover .card-thumb::after {
  transform: translateX(100%);
}

.card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.3rem;
}

.card p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--text-1);
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.card-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-0);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform .25s ease;
}

.card:hover .card-link svg {
  transform: translate(3px, -3px);
}

/* =========================================================
   ABOUT & FOOTER
========================================================= */
.about {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.about-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  padding: 34px;
}

.about h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.3;
  max-width: 20ch;
}

.about p {
  margin-top: 18px;
  color: var(--text-1);
  line-height: 1.75;
  max-width: 48ch;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

footer {
  padding: 36px 6vw 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 2;
}

footer a:hover {
  color: var(--warm);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media(max-width: 760px) {
  .scrubber-marks { display: none; }
  .about { grid-template-columns: 1fr; }
}

@media(prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}