/* ===========================
   CSS DESIGN TOKENS & RESET
   =========================== */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2333;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --accent-glow: rgba(74, 222, 128, 0.3);
  --text: #e6edf3;
  --muted: #8b949e;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;

  --nav-h: 72px;
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

/* ===========================
   UTILITIES
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

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

.section-header {
  margin-bottom: 64px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--muted);
  margin-top: 12px;
  font-size: 1rem;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

/* ===========================
   TAGS / BADGES
   =========================== */
.tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.accent-tag {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.45);
}

/* ===========================
   NAVBAR
   =========================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: all var(--transition);
}

#navbar.scrolled {
  background: rgba(13, 17, 23, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all var(--transition);
  flex-shrink: 0;
}

.nav-cta:hover {
  background: transparent;
  color: var(--accent) !important;
  outline: 2px solid var(--accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74, 222, 128, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.7;
  animation: bgFloat 18s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 50%, rgba(74, 222, 128, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 90%, rgba(74, 222, 128, 0.03) 0%, transparent 45%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(-5px, -8px); }
  66%       { transform: translate(5px, 5px); }
}

.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-typed-wrapper {
  min-height: 2.4rem;
  margin-bottom: 24px;
}

#typed-output {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

.typed-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-tagline {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 36px;
}

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

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-frame {
  width: clamp(260px, 32vw, 360px);
  height: clamp(260px, 32vw, 360px);
  border-radius: 50%;
  border: 3px solid rgba(74, 222, 128, 0.5);
  padding: 6px;
  box-shadow:
    0 0 60px rgba(74, 222, 128, 0.2),
    0 0 120px rgba(74, 222, 128, 0.08),
    inset 0 0 30px rgba(74, 222, 128, 0.04);
  animation: photoPulse 4s ease-in-out infinite;
  background: var(--surface);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes photoPulse {
  0%, 100% {
    box-shadow: 0 0 40px rgba(74, 222, 128, 0.15), 0 0 80px rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.4);
  }
  50% {
    box-shadow: 0 0 80px rgba(74, 222, 128, 0.35), 0 0 140px rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.8);
  }
}

.scroll-down {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.1rem;
  animation: bounce 2.2s ease-in-out infinite;
  z-index: 1;
  transition: color var(--transition);
}

.scroll-down:hover { color: var(--accent); }

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

/* ===========================
   ABOUT
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}

.about-photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1;
  box-shadow: var(--shadow-lg);
}

.about-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-bio {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 0.975rem;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
}

.stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ===========================
   SKILLS
   =========================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.skill-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow: 0 0 28px var(--accent-dim);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.skill-card-header i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 28px;
  text-align: center;
}

.skill-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 0.875rem;
  color: var(--muted);
}

.skill-label span:last-child {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
}

.skill-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(74, 222, 128, 0.55));
  border-radius: 4px;
  width: 0%;
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===========================
   EXPERIENCE / TIMELINE
   =========================== */
.timeline {
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 60%, transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -31px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color var(--transition);
}

.timeline-content:hover {
  border-color: rgba(74, 222, 128, 0.25);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.timeline-company {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.timeline-company i {
  color: var(--accent);
  font-size: 0.8rem;
}

.timeline-bullets {
  list-style: none;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-bullets li {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}

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

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ===========================
   EDUCATION
   =========================== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.edu-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color var(--transition), transform var(--transition);
}

.edu-card:hover {
  border-color: rgba(74, 222, 128, 0.3);
  transform: translateY(-4px);
}

.edu-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.edu-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  letter-spacing: 0.04em;
}

.edu-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.edu-school {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.edu-date {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.edu-coursework {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===========================
   PROJECTS
   =========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: rgba(74, 222, 128, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

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

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-info p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-link {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition), opacity var(--transition);
}

.project-link:hover {
  gap: 12px;
}

/* Coming Soon card */
.project-coming {
  border: 2px dashed rgba(74, 222, 128, 0.2);
  background: rgba(13, 17, 23, 0.5);
}

.project-coming:hover {
  border-color: rgba(74, 222, 128, 0.45);
  transform: translateY(-4px);
}

.coming-soon {
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.coming-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.coming-badge {
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.coming-soon h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.coming-soon > p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 300px;
}

/* ===========================
   CONTACT
   =========================== */
.contact-wrapper {
  max-width: 560px;
}

.contact-intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}

a.contact-item:hover {
  border-color: rgba(74, 222, 128, 0.3);
  transform: translateX(5px);
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.contact-detail {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(139, 148, 158, 0.45);
}

/* ===========================
   RESPONSIVE — TABLET (≤1024px)
   =========================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: unset;
  }

  .hero-photo { order: -1; }

  .photo-frame {
    width: 220px;
    height: 220px;
  }

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

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

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

  .about-photo-col {
    max-width: 280px;
    margin: 0 auto;
  }

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

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

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

/* ===========================
   RESPONSIVE — MOBILE (≤768px)
   =========================== */
@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .nav-links,
  .nav-cta { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(16px);
    padding: 20px 24px 28px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }

  .nav-links.open .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hamburger { display: flex; }

  .about-stats { gap: 24px; }

  .timeline { padding-left: 24px; }

  .timeline-dot { left: -19px; }

  .timeline-meta { flex-direction: column; gap: 8px; }

  .timeline-content { padding: 20px; }
}

/* ===========================
   RESPONSIVE — SMALL (≤480px)
   =========================== */
@media (max-width: 480px) {
  .hero-name { font-size: 2.2rem; }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn { justify-content: center; }

  .about-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .coming-soon { padding: 36px 20px; }
}
