/* ============================================================
   Variables
   ============================================================ */
:root {
  --bg:        #0a0e17;
  --bg-light:  #0f1623;
  --surface:   #131c2e;
  --border:    #1e2d45;
  --accent:    #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.1);
  --text:      #ccd6f6;
  --text-dim:  #8892b0;
  --text-bright: #e6f1ff;
  --navy:      #112240;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h:     70px;
  --max-w:     1000px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: min(var(--max-w), 100%);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 2.5rem);
}

.section-inner {
  padding-block: clamp(4rem, 10vh, 7rem);
}

/* ============================================================
   Navigation
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

#nav.scrolled {
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  width: min(var(--max-w) + 100px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 2.5rem);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent);
  margin-right: auto;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  counter-reset: nav-item;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: color var(--transition);
  counter-increment: nav-item;
}

.nav-links a::before {
  content: "0" counter(nav-item) ". ";
  color: var(--accent);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: rgba(100, 255, 218, 0.18);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
}

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

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 0.95rem;
}

/* ============================================================
   Section titles
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 2.5rem;
  white-space: nowrap;
}

.section-title::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
  flex: 1;
  min-width: 60px;
}

.num {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
  font-weight: 400;
}

/* ============================================================
   Hero
   ============================================================ */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-tagline {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text-dim);
  line-height: 1.1;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.55s forwards;
}

.hero-bio {
  max-width: 540px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.7s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.85s forwards;
}

/* ============================================================
   About
   ============================================================ */
#about { background: var(--bg-light); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.about-text p:last-of-type { margin-bottom: 1.25rem; }

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 1rem;
}

.skills-list li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 1.2rem;
  position: relative;
}

.skills-list li::before {
  content: '▸';
  color: var(--accent);
  position: absolute;
  left: 0;
}

.about-photo {
  flex-shrink: 0;
}

.photo-wrapper {
  position: relative;
  width: 240px;
}

.photo-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 8px;
  translate: 12px 12px;
  z-index: 0;
  transition: translate var(--transition);
}

.photo-wrapper:hover::after {
  translate: 8px 8px;
}

.photo-placeholder {
  width: 240px;
  height: 280px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
  transition: translate var(--transition);
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.photo-wrapper:hover .photo-placeholder {
  translate: -4px -4px;
}

/* ============================================================
   Experience
   ============================================================ */
.exp-layout {
  display: flex;
  gap: 2.5rem;
  align-items: start;
}

.exp-tabs {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  border-left: 2px solid var(--border);
}

.exp-tab {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: left;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all var(--transition);
  white-space: nowrap;
}

.exp-tab:hover { color: var(--accent); background: var(--accent-dim); }

.exp-tab.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.exp-panels { flex: 1; }

.exp-panel { display: none; }
.exp-panel.active { display: block; }

.exp-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}

.exp-company {
  color: var(--accent);
  font-weight: 400;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.exp-bullets li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.exp-bullets li::before {
  content: '▸';
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* ============================================================
   Projects
   ============================================================ */
#projects { background: var(--bg-light); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: translate var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  translate: 0 -4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.project-card.featured {
  grid-column: span 1;
}

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-icon { color: var(--accent); }

.project-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.project-links a {
  color: var(--text-dim);
  transition: color var(--transition);
}

.project-links a:hover { color: var(--accent); }

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.project-tech li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.project-tech li::before {
  content: '# ';
  color: var(--accent);
}

.projects-more {
  text-align: center;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-inner {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.contact-overline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1.25rem;
}

.contact-desc {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

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

.footer-links a {
  color: var(--text-dim);
  transition: color var(--transition), translate var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  translate: 0 -2px;
}

.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; translate: 0 20px; }
  to   { opacity: 1; translate: 0 0; }
}

.fade-in {
  opacity: 0;
  translate: 0 20px;
  transition: opacity 0.6s ease, translate 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  translate: 0 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav-links, #nav .btn-outline { display: none; }

  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--surface);
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.1rem;
    z-index: 99;
  }

  .nav-links.open a { font-size: 1rem; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { display: none; }

  .exp-layout { flex-direction: column; }

  .exp-tabs {
    flex-direction: row;
    border-left: none;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .exp-tab {
    border-left: none;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    margin-bottom: -2px;
    padding: 0.6rem 1rem;
  }

  .exp-tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }

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

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
