/* ============================================================
   BASE & VARIABLES
   ============================================================ */
:root {
  --bg:          #0a0e1a;
  --bg-alt:      #0f1423;
  --surface:     #141929;
  --surface-2:   #1c2238;
  --border:      rgba(255,255,255,0.07);
  --accent:      #3b82f6;
  --accent-dim:  rgba(59,130,246,0.15);
  --accent-2:    #22d3ee;
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --mono-font:   'JetBrains Mono', 'Fira Code', monospace;
  --sans-font:   'Inter', system-ui, sans-serif;
  --radius:      8px;
  --radius-lg:   16px;
  --nav-h:       64px;
  --max-w:       1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans-font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* prevent horizontal scroll on any screen */
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

ul { list-style: none; }

.mono { font-family: var(--mono-font); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  height: var(--nav-h);
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.4); }

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

.nav-logo {
  font-family: var(--mono-font);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 2px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.nav-logo:hover { color: var(--accent); border-color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px; /* slightly tighter to fit 6 items comfortably */
}

/* tighten nav links on smaller desktops */
@media (max-width: 960px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  /* no overflow:hidden here — it clips the photo ring */
}

/* contain the bg-grid within the hero without clipping child content */
.hero-bg-grid {
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  padding: 80px 24px 120px;
}

@media (max-width: 900px) {
  .hero-content { padding: 60px 24px 80px; }
}

@media (max-width: 480px) {
  .hero-content { padding: 40px 20px 60px; }
}

.hero-split {
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

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

.hero-tag {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 400;
  color: var(--text-dim);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.06);
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.35;
}

.hero-scroll-hint .mono { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.btn-full { width: 100%; text-align: center; display: block; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

@media (max-width: 900px) { .section { padding: 72px 0; } }
@media (max-width: 480px) { .section { padding: 52px 0; } }

.section-label {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 48px;
  color: var(--text);
}

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

.about-text p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: 16.5px;
}

.about-text .section-title { margin-bottom: 28px; }

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

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -1px;
}

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

.about-aside { display: flex; flex-direction: column; gap: 20px; }

/*
  Ring approach: wrap is ring-size, photo is inset inside it.
  Ring never overflows the wrap → no clipping from parent overflow.
  Ring thickness = 6px each side.
*/
.profile-photo-wrap {
  position: relative;
  /* photo 268px + 6px ring each side = 280px total */
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  border-radius: 50%;
}

.profile-photo {
  position: absolute;
  inset: 6px;               /* 6px inset = ring thickness */
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%; /* bias toward upper face */
  display: block;
  z-index: 1;
  border: 3px solid var(--surface-2);
}

.profile-photo-ring {
  position: absolute;
  inset: 0;                 /* fills wrap exactly — no overflow */
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent-2), var(--accent));
  z-index: 0;
  opacity: 0.8;
  animation: ringRotate 8s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .hero-split {
    flex-direction: column-reverse;
    gap: 32px;
  }
  .hero-photo-col { margin-top: 0; }
  .profile-photo-wrap { width: 190px; height: 190px; }
}

@media (max-width: 480px) {
  .profile-photo-wrap { width: 148px; height: 148px; }
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.about-card-title {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.about-list li {
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-list li:last-child { border-bottom: none; }
.about-list li::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.skill-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.skill-icon {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--accent);
  line-height: 1;
}

.skill-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.skill-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

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

.skill-tags li {
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.3);
}

.project-featured {
  border-left: 3px solid var(--accent);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-domain {
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.project-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.project-specs li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-specs .mono {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.project-specs li span + * {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* But we used inline spans, so target the value differently */
.project-specs li {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-family: var(--mono-font);
  font-size: 11.5px;
  color: var(--accent-2);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 3px 10px;
  border-radius: 4px;
}

.project-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.5px;
  transition: color 0.2s, gap 0.2s;
}
.project-link:hover { color: var(--accent-2); }

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

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

.timeline-item {
  position: relative;
  margin-bottom: 52px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

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

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

.timeline-content h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.timeline-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.65;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}

.contact-text p {
  color: var(--text-dim);
  font-size: 16.5px;
  margin-bottom: 18px;
}

.contact-text .section-title { margin-bottom: 28px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 36px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-dim);
  font-size: 15px;
  transition: color 0.2s;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact-item:hover { color: var(--accent); border-color: rgba(59,130,246,0.3); }

.contact-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  flex-shrink: 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.contact-card h3 {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.info-table { width: 100%; border-collapse: collapse; }
.info-table td {
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.info-table tr:last-child td { border-bottom: none; }
.info-table td:first-child {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  width: 110px;
  padding-right: 12px;
}
.info-table td:last-child { color: var(--text-dim); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

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

.footer-logo {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 3px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

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

/* ============================================================
   RESPONSIVE — consolidated breakpoints
   ============================================================ */

/* ── Tablet landscape / mid screens (≤ 900px) ── */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid    { grid-template-columns: repeat(2, 1fr); }
  .projects-grid  { grid-template-columns: 1fr; }
}

/* ── Tablet portrait / small screens (≤ 768px) ── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 12px; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-split { gap: 40px; }

  .about-stats { gap: 28px; }

  .timeline-header { flex-direction: column; gap: 4px; }
  .timeline-date   { white-space: normal; }

  .contact-grid { gap: 40px; }
}

/* ── Mobile vertical (≤ 480px) ── */
@media (max-width: 480px) {
  /* nav — shrink links to fit */
  .nav-inner { padding: 0 12px; gap: 0; }
  .nav-links { gap: 6px; }
  .nav-links a { font-size: 11px; letter-spacing: 0; }

  /* hero */
  .hero-name { font-size: clamp(38px, 10vw, 56px); letter-spacing: -1px; }
  .hero-title { font-size: 16px; }
  .hero-desc  { font-size: 15px; }
  .hero-tag   { font-size: 11px; letter-spacing: 2px; }
  .hero-chips { gap: 8px; }
  .chip       { font-size: 11px; padding: 4px 10px; }


  /* skills go single column */
  .skills-grid { grid-template-columns: 1fr; }

  /* stats stack */
  .about-stats { flex-direction: column; gap: 20px; }

  /* section titles */
  .section-title { letter-spacing: -0.5px; margin-bottom: 32px; }

  /* contact */
  .info-table td:first-child { width: 90px; font-size: 11px; }

  /* footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* buttons */
  .btn { padding: 11px 20px; font-size: 14px; }
  .hero-cta { gap: 10px; }

  /* container padding */
  .container { padding: 0 16px; }
}

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border-left: 4px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.3);
}

.achievement-gold { border-left-color: #f59e0b; }
.achievement-silver { border-left-color: #94a3b8; }
.achievement-school { border-left-color: var(--accent-2); }

.achievement-rank {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.achievement-gold   .achievement-rank { color: #f59e0b; }
.achievement-silver .achievement-rank { color: #94a3b8; }
.achievement-school .achievement-rank { color: var(--accent-2); }

.achievement-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.achievement-context {
  font-size: 12px;
  font-family: var(--mono-font);
  color: var(--text-muted);
  margin-bottom: 10px;
}

.achievement-card p:last-of-type {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   CLUBS
   ============================================================ */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.club-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.club-card h4 {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.club-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.club-card .timeline-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* inline achievement badge inside timeline */
.achievement-inline {
  display: inline-block;
  font-size: 11.5px;
  color: #f59e0b;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

/* achievements & clubs collapse at 900px — added to main responsive block above */
@media (max-width: 900px) {
  .achievements-grid { grid-template-columns: 1fr; }
  .clubs-grid        { grid-template-columns: 1fr; }
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(59,130,246,0.25);
  color: var(--text);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
