/* ============================================
   Dark Space Portfolio — Design System
   ============================================ */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0d1a;
  --bg-card: #111427;
  --bg-card-hover: #161a30;
  --bg-surface: #0e1126;
  --text: #ffffff;
  --text-dim: #8b8fa3;
  --text-muted: #6e7388;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.15);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 980px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* --- Dot Grid Background --- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Everything sits above the grid */
#nav, .hero, .section, .footer {
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 13, 26, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-monogram {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1f3a, #252a45);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
}

.nav-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-contact-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: all var(--transition);
}

.nav-contact-btn:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 18px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  position: absolute;
  left: 0;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

.nav-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 32px 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex: 1;
}

.hero-left {
  flex: 1;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-name {
  font-family: var(--font-body);
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--text);
}

.hero-tagline {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-tagline .highlight {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn-ghost {
  border: 1px solid transparent;
  color: var(--text-dim);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
}

.btn-arrow {
  font-size: 16px;
  transition: transform var(--transition);
}

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

/* --- Hero Card --- */
.hero-right {
  flex-shrink: 0;
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

.card-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 8px 16px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-pill);
}

.status-icon {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}


/* --- Hero Stats Bar --- */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 32px 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* --- Sections --- */
.section {
  padding: 120px 32px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.section-number {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
}

.body-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.body-text strong {
  color: var(--text);
  font-weight: 600;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4/5;
  border: 1px solid var(--border);
}

.about-heading {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

/* --- Experience --- */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-bottom: 4px;
}

.exp-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.exp-date {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.exp-loc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.exp-role {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-company {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.exp-stack {
  font-size: 13px;
  color: var(--text-muted);
}

.exp-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: all var(--transition);
  opacity: 0;
}

.exp-row:hover .exp-arrow {
  opacity: 1;
  color: var(--text);
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}

.project-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.project-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-surface);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.project-info {
  padding: 20px 24px;
}

.project-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.project-info p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Awards --- */
.awards {
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.awards-heading {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.award-row {
  display: flex;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.award-row:last-child {
  border-bottom: none;
}

.award-year {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 48px;
  font-variant-numeric: tabular-nums;
}

.award-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.award-desc {
  font-size: 13px;
  color: var(--text-dim);
}

/* --- Education --- */
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 12px;
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 24px;
}

.edu-top h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-school {
  font-size: 14px;
  color: var(--text-dim);
}

.edu-year {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
}

.edu-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.edu-images img {
  border-radius: var(--radius-sm);
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border: 1px solid var(--border);
}

.edu-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.edu-videos iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* --- Beyond Work --- */
.beyond-intro {
  margin-bottom: 32px;
}

.beyond-intro h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.beyond-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 64px;
}

.beyond-card {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 36px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.beyond-card.reverse {
  grid-template-columns: 1.3fr 1fr;
}

.beyond-card.reverse .beyond-card-img {
  order: 2;
}

.beyond-card-img img {
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.beyond-card-body h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.beyond-card-body p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 16px;
}

.text-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: opacity var(--transition);
}

.text-link:hover {
  opacity: 0.8;
}

.beyond-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.beyond-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.beyond-tile:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.beyond-tile-img {
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.beyond-tile-img img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.beyond-tile h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.beyond-tile p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* --- Contact --- */
.section-contact {
  border-top: 1px solid var(--border);
}

.contact-center {
  text-align: center;
  max-width: 560px;
}

.contact-center .section-header {
  justify-content: center;
}

.contact-heading {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.contact-email {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--text-muted);
  margin-bottom: 32px;
  transition: border-color var(--transition);
}

.contact-email:hover {
  border-color: var(--text);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition);
}

.social-link:hover {
  color: var(--text);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  background: var(--bg);
}

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

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

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

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .projects-grid,
  .beyond-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-name {
    font-size: clamp(56px, 8vw, 90px);
  }

  .exp-row {
    grid-template-columns: 180px 1fr auto;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-right, .nav-name {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 13, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    list-style: none;
    z-index: 999;
  }

  .nav-links.open a {
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 20px 0;
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-badge {
    justify-content: center;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 0;
  }

  .stat-divider {
    width: 100%;
    height: 1px;
  }

  .section {
    padding: 80px 20px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image img {
    aspect-ratio: 16/10;
    max-height: 320px;
  }

  .exp-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exp-arrow {
    display: none;
  }

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

  .edu-top {
    flex-direction: column;
    gap: 4px;
  }

  .edu-images, .edu-videos {
    grid-template-columns: 1fr;
  }

  .edu-card {
    padding: 24px 20px;
  }

  .beyond-card,
  .beyond-card.reverse {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .beyond-card.reverse .beyond-card-img {
    order: 0;
  }

  .beyond-tiles {
    grid-template-columns: 1fr;
  }

  .award-row {
    flex-direction: column;
    gap: 4px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 48px;
  }

  .section-title {
    font-size: 24px;
  }

  body {
    font-size: 15px;
  }
}
