/* Variables */
:root {
  --bg: #fafaf9;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #64748b;
  --accent: #10b981;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.07);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Nav ─────────────────────────────────────────────── */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-links a:not(.nav-cta) {
  position: relative;
}

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

.nav-links a:not(.nav-cta).active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-cta {
  background: var(--text) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
}

.nav-cta:hover {
  opacity: 0.82 !important;
  color: var(--bg) !important;
}

#lang-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 0.5rem;
}

#lang-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ─── Hero ────────────────────────────────────────────── */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(59, 130, 246, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 60% 90%, rgba(251, 113, 133, 0.05) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 7rem 2rem 5rem;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.hero-location {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-location i {
  margin-right: 0.4rem;
  color: var(--accent);
}

h1 {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.accent {
  color: var(--accent);
  font-weight: 600;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.hero-links {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: #2a2a4a;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.hero-social {
  display: flex;
  gap: 1.25rem;
}

.hero-social a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.hero-social a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

/* ─── Sections ────────────────────────────────────────── */

section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.75rem;
}

/* ─── About ───────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.fact:first-child {
  padding-top: 0;
}

.fact:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fact-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* ─── Timeline ────────────────────────────────────────── */

.timeline {
  position: relative;
  padding-left: 1.25rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.25rem 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -0.4375rem;
  top: 6px;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.timeline-header h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.internship-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-company a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: opacity 0.2s;
}

.timeline-company a:hover {
  opacity: 0.7;
}

.timeline-bullets {
  list-style: none;
  margin-top: 0.5rem;
}

.timeline-bullets li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.2rem;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.05em;
}

/* ─── Projects ────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow);
}

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

.project-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.project-body {
  flex: 1;
}

.project-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: 'Courier New', 'Courier', monospace;
  letter-spacing: -0.01em;
}

.project-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.project-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.project-link i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.project-card:hover .project-link i {
  transform: translateX(4px);
}

/* ─── Education ───────────────────────────────────────── */

.education-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.95rem;
}

.edu-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.edu-degree {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.edu-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Footer ──────────────────────────────────────────── */

footer {
  background: var(--text);
  color: var(--bg);
  padding: 2rem 0;
}

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

footer p {
  font-size: 0.825rem;
  opacity: 0.5;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--bg);
  opacity: 0.5;
  font-size: 1.05rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ─── Responsive ──────────────────────────────────────── */

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

  h1 {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

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

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

  .timeline-header {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .hero-content {
    padding: 6rem 1.25rem 3.5rem;
  }
}

/* ── Scroll-reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Respect reduced-motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
