/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #080a0f;
  --bg-panel: rgba(10, 13, 20, 0.55);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-main: #f0ece4;
  --text-muted: #7a7669;
  --text-faint: #3d3c38;

  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: rgba(201, 168, 76, 0.12);

  --mono: "DM Mono", monospace;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;

  --scroll-width: 0%;
  --radius: 4px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* ─── BASE ───────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── GRAIN OVERLAY ──────────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── SCROLL PROGRESS ────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: var(--scroll-width);
  z-index: 1001;
  will-change: width;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}

/* ─── 3D CANVAS ──────────────────────────────────────────────── */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 80% 60% at 60% 40%,
    #111620 0%,
    #080a0f 70%
  );
}

/* ─── TICKER ─────────────────────────────────────────────────── */
.ticker-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  height: 34px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  animation: ticker 32s linear infinite;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker-dot {
  color: var(--gold);
  font-size: 0.5rem;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ─── NAVBAR ─────────────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    background 0.4s,
    border-bottom 0.4s;
  background: transparent;
}

nav.scrolled {
  background: rgba(8, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--gold);
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.25);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s ease;
}
.logo-circle:hover {
  transform: rotate(360deg) scale(1.05);
}
.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-main);
  background: linear-gradient(
    90deg,
    var(--gold),
    var(--gold-light),
    var(--gold)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.25s;
}
.nav-links a:hover {
  color: var(--text-main);
}

.nav-links .nav-cta {
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 2px;
  margin-left: 0.5rem;
  transition:
    background 0.25s,
    color 0.25s;
}
.nav-links .nav-cta:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
}

/* ─── RULED DIVIDERS ─────────────────────────────────────────── */
.ruled-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 3rem;
}
.ruled-divider::before,
.ruled-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.ruled-divider::after {
  flex: 3;
}

/* ─── MONO LABEL ─────────────────────────────────────────────── */
.mono-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 5rem;
}

.hero-meta {
  display: flex;
  gap: 3rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease both;
}

h1 {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 3rem;
}

.hero-line {
  display: block;
  animation: fadeInUp 0.9s ease both;
}
.hero-line:nth-child(2) {
  animation-delay: 0.1s;
}
.hero-line:nth-child(3) {
  animation-delay: 0.2s;
}

.italic-line {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
}

.hero-line-accent {
  color: var(--gold);
  text-shadow: 0 0 60px rgba(201, 168, 76, 0.2);
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  gap: 4rem;
  animation: fadeInUp 1s ease 0.3s both;
}

p.subtitle {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.8;
  border-left: 2px solid var(--gold);
  padding-left: 1.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
}

.scroll-hint {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  writing-mode: vertical-rl;
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition:
    background 0.25s,
    transform 0.2s,
    box-shadow 0.25s;
  box-shadow: 0 0 0 rgba(201, 168, 76, 0);
}
.btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold-dim);
  color: var(--gold-light);
}

/* ─── PANELS ─────────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4rem 3.5rem;
  margin-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

/* subtle corner accent */
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 1px;
  background: var(--gold);
}
.panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 60px;
  background: var(--gold);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-main);
}

/* ─── PROJECT CARDS ──────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s,
    transform 0.35s;
}

.project-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.project-card:hover::after {
  transform: scaleX(1);
}
.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-6px);
}

.card-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 1.2rem;
}

.project-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}

.panel-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* ─── TECH GRID ──────────────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.tech-category {
  background: rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tech-category h4 {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 5px 14px;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 2px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.tag:hover {
  background: var(--gold-dim);
  border-color: rgba(201, 168, 76, 0.4);
  color: var(--gold-light);
}

/* ─── ABOUT GRID ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.accent-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.vision-box {
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: var(--radius);
  padding: 2rem;
}

.vision-box h3 {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.vision-list {
  list-style: none;
  color: var(--text-muted);
}

.vision-list li {
  font-size: 0.875rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
  transition:
    color 0.25s,
    padding-left 0.25s;
}
.vision-list li:last-child {
  border-bottom: none;
}
.vision-list li:hover {
  color: var(--text-main);
  padding-left: 0.5rem;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  padding: 3.5rem 0 5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 34px; /* room for ticker */
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner p {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.footer-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-link:hover {
  color: var(--gold-light);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding: 0 1.2rem;
  }

  nav {
    padding: 1.2rem 0;
  }

  .nav-links {
    gap: 0;
  }
  .nav-links a {
    font-size: 0.68rem;
    padding: 0.4rem 0.6rem;
    margin-left: 0;
  }
  .nav-links .nav-cta {
    margin-left: 0.25rem;
  }

  .logo-text {
    font-size: 0.85rem;
  }
  .logo-circle {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .hero-meta {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8rem;
  }
  .scroll-hint {
    writing-mode: horizontal-tb;
  }

  .panel {
    padding: 2rem 1.4rem;
  }
  .panel::before,
  .panel::after {
    display: none;
  }

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticker-wrap {
    display: none;
  } /* hide on very small screens if needed */
}
