/* ============================================================
   dgaitsgo.com — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ---- Design Tokens ---- */
:root {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface-2:   #1a1a1a;
  --border:      #222222;
  --border-2:    #333333;
  --text:        #e4e1dc;
  --text-muted:  #888888;
  --text-faint:  #444444;
  --accent:      #c8964a;
  --accent-dim:  rgba(200, 150, 74, 0.10);
  --accent-dim2: rgba(200, 150, 74, 0.18);
  --radius:      8px;
  --max-w:       1100px;
  --nav-h:       64px;
  --sans:        'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 48px; } }

section { padding: 88px 0; }
@media (max-width: 767px) { section { padding: 64px 0; } }

/* ---- Typography helpers ---- */
h1, h2, h3, h4, h5 {
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  transition: background 250ms, border-color 250ms;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(10,10,10,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 200ms, background 200ms;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid rgba(200,150,74,0.35);
  padding: 6px 16px;
  margin-left: 8px;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.nav-links .nav-cta:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 300ms var(--ease), opacity 300ms;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 199;
  padding: 12px 0 20px;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
}
.nav-mobile-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile-menu a {
  display: block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 200ms;
}
.nav-mobile-menu a:hover { color: var(--text); }

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + 96px);
  padding-bottom: 112px;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero-available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(200,150,74,0.25);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.hero-available .pulse {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.75); }
}

.hero h1 {
  font-size: clamp(52px, 9vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 28px;
}
.hero h1 .line2 { color: var(--text-muted); font-weight: 300; }

.hero-desc {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 44px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius);
  transition: background 200ms, border-color 200ms, transform 180ms, box-shadow 200ms;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-primary:hover {
  background: #d9a55a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,150,74,0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

/* ============================================================
   SECTION LABELS
   ============================================================ */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.section-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-eyebrow .label { white-space: nowrap; }

/* ============================================================
   SPECIALTY CARDS (what I build)
   ============================================================ */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .spec-grid { grid-template-columns: 1fr; } }

.spec-card {
  background: var(--bg);
  padding: 32px 28px;
  transition: background 220ms;
}
.spec-card:hover { background: var(--surface); }
.spec-icon { font-size: 26px; margin-bottom: 20px; }
.spec-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.spec-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   PROJECT CARDS GRID
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 700px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 220ms;
  position: relative;
}
.project-card:hover { background: var(--surface); }
.project-card:hover .card-arrow { transform: translate(4px,-4px); color: var(--accent); }

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}
.tag-accent {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(200,150,74,0.22);
}
.card-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.card-arrow {
  align-self: flex-end;
  font-size: 18px;
  color: var(--text-faint);
  transition: transform 200ms var(--ease), color 200ms;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 180ms;
}
.footer-links a:hover { color: var(--text); }

/* ============================================================
   PAGE HERO (about, contact)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + 88px);
  padding-bottom: 72px;
}
.page-hero .label { display: block; margin-bottom: 20px; }
.page-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.page-hero .lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.75;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .about-two-col { grid-template-columns: 1fr; gap: 48px; }
}

.about-body p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 20px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--text); font-weight: 600; }

.skills-block { margin-bottom: 36px; }
.skills-block:last-child { margin-bottom: 0; }
.skills-block h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.skills-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ============================================================
   CASE STUDY
   ============================================================ */
.case-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 36px;
  transition: color 180ms;
}
.case-back:hover { color: var(--text); }

.case-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.case-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.case-summary {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 700px;
  line-height: 1.75;
}

.case-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 72px;
  align-items: start;
  padding: 72px 0;
}
@media (max-width: 900px) {
  .case-layout { grid-template-columns: 1fr; gap: 48px; }
  .case-sidebar { order: -1; }
}

/* Case study content */
.case-content h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.case-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.case-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 16px;
}
.case-content ul {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-content li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}
.case-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 3px;
}

/* Sidebar */
.case-sidebar { position: sticky; top: calc(var(--nav-h) + 28px); }
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 12px;
}
.sidebar-block:last-child { margin-bottom: 0; }
.sidebar-block .label { display: block; margin-bottom: 12px; }
.sidebar-block p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-intro {
  max-width: 600px;
  margin-bottom: 56px;
}
.contact-intro h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.contact-intro p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.75;
}

.contact-links { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.contact-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateX(6px);
}
.contact-item:hover .contact-arrow { color: var(--accent); }
.contact-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.contact-text { flex: 1; }
.contact-text strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.contact-text span  { font-size: 13px; color: var(--text-muted); }
.contact-arrow { font-size: 16px; color: var(--text-faint); transition: color 180ms; }

/* ============================================================
   UTILITIES / ANIMATIONS
   ============================================================ */
.divider { height: 1px; background: var(--border); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 550ms var(--ease), transform 550ms var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Selection */
::selection { background: rgba(200,150,74,0.25); color: var(--text); }

.no-padding {
  padding-top: 0 !important;
}

  .link-external {
    color: var(--accent);
    border-bottom: 1px solid rgba(200, 150, 74, 0.35);
    transition: border-color 180ms var(--ease), color 180ms var(--ease);
  }
  .link-external::after {
    content: ' ↗';
    font-size: 0.75em;
    opacity: 0.6;
    vertical-align: super;
  }
  .link-external:hover {
    color: #d9a55a;
    border-bottom-color: var(--accent);
  }