:root {
  --bg: #05060a;
  --bg-elevated: rgba(15, 18, 30, 0.9);
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.4);
  --text: #f5f7ff;
  --text-muted: #9aa0c2;
  --border-soft: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
  --transition-fast: 0.25s ease;
  --max-width: 1120px;
  --nav-height: 72px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #101528 0, #05060a 55%, #020308 100%);
  color: var(--text);
}

body.theme-dark {
  min-height: 100vh;
}

/* Layout */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 10, 0.92),
    rgba(5, 6, 10, 0.75),
    transparent
  );
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 18px var(--accent-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-url {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--text);
  background: rgba(79, 140, 255, 0.18);
}

/* Mobile nav */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px);
}

.nav-toggle.active span:nth-child(2) {
  transform: rotate(-45deg) translateY(-5px);
}

/* Sections */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 20px;
}

.hero {
  padding-top: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: center;
}

.hero-main h1 {
  font-size: clamp(32px, 4vw, 40px);
  margin: 10px 0 16px;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 25px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--accent);
}

.section-header {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0 0 8px;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Cards & grids */

.glass-card {
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(163, 99, 255, 0.12), transparent 55%),
    var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 20px 20px 22px;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.glass-card:hover::before {
  opacity: 1;
}

.card-title {
  margin: 10px 0 4px;
}

.card-sub {
  margin: 0 0 14px;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 13px;
}

.label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.value {
  display: block;
}

.card-link {
  display: inline-flex;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.timeline,
.timeline-mini {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  position: relative;
}

.timeline-item h2,
.timeline-item h3 {
  margin-top: 0;
}

.bullet-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.bullet-list li {
  margin-bottom: 4px;
}

.section-cta {
  margin-top: 24px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, #4f8cff, #a363ff);
  box-shadow: 0 0 18px var(--accent-soft);
}

.btn.primary:hover {
  box-shadow: 0 0 32px rgba(79, 140, 255, 1);
}

.btn.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

.btn-glow {
  box-shadow: 0 0 18px rgba(79, 140, 255, 0.6);
}

.btn-glow:hover {
  box-shadow: 0 0 28px rgba(79, 140, 255, 1);
}

/* Universal button animation fix */
.btn {
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

/* PREMIUM BUTTON SYSTEM — ONLY BUTTONS UPDATED */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: #fff;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease;
}

/* Hover animation (Apple-style lift + glow) */
.btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 22px rgba(79, 140, 255, 0.65);
  border-color: rgba(79, 140, 255, 0.6);
}

/* Primary button (gradient like View Projects) */
.btn.primary {
  background: linear-gradient(135deg, #4f8cff, #a363ff);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(79, 140, 255, 0.55);
}

.btn.primary:hover {
  box-shadow: 0 0 32px rgba(79, 140, 255, 1);
}

/* Ghost button */
.btn.ghost {
  background: rgba(255,255,255,0.05);
}

/* Secondary button */
.btn.secondary {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.15);
}

/* Extra glow class */
.btn-glow {
  box-shadow: 0 0 18px rgba(79, 140, 255, 0.6);
}

.btn-glow:hover {
  box-shadow: 0 0 28px rgba(79, 140, 255, 1);
}

/* Tap feedback */
.btn:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 0 12px rgba(79, 140, 255, 0.4);
}


/* Scroll indicator */

.scroll-indicator {
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Profile */

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 24px var(--accent-soft);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-name {
  font-weight: 600;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 12px;
}

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

.footer-right {
  text-align: right;
}

.footer-note {
  color: var(--text-muted);
  font-size: 11px;
}

/* Forms & map */

.contact-form .form-group {
  margin-bottom: 12px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(5, 6, 10, 0.9);
  color: var(--text);
  font-size: 13px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.4);
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

/* Utilities */

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

.small {
  font-size: 12px;
}

.center-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scroll animations */

.section-observe {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-observe.in-view {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .footer-right {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    right: 0;
    left: 0;
    padding: 10px 20px 16px;
    background: rgba(5, 6, 10, 0.98);
    flex-direction: column;
    gap: 8px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }
}
