/* ─── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #0A0A0A;
  --surface:     #141414;
  --surface-2:   #1C1C1C;
  --border:      #252525;
  --accent:      #F59E0B;
  --accent-dark: #D97706;
  --text:        #F1F5F9;
  --text-muted:  #64748B;
  --text-dim:    #334155;
  --radius:      12px;
  --radius-sm:   8px;
  --nav-h:       64px;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font:        'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
em { font-style: normal; color: var(--accent); }

/* ─── ANNOTATION ─────────────────────────────────────────────────────────── */
.annotated-word {
  position: relative;
  display: inline-block;
}
.annotation {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
}
.annotation-arrow {
  display: block;
  color: var(--accent);
}
.annotation-right {
  transform: translateX(-50%) rotate(4deg);
}

/* ─── NAVBAR ─────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 6px 16px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px 24px;
}
.nav-mobile-menu ul { display: flex; flex-direction: column; gap: 16px; }
.nav-mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-mobile-menu a:hover { color: var(--accent); }
.nav-mobile-menu.open { display: block; }

/* ─── SECTION SHARED ─────────────────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 8px;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-full { width: 100%; justify-content: center; }
.arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}
.fade-in-delay { animation-delay: 0.15s; }

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

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.reveal-delay { transition-delay: 0.15s; }
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 60px;
}
.hero-content { flex: 1; }
.hero-eyebrow {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 400;
}
.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-typed-wrapper {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 400;
}
.hero-typed {
  color: var(--accent);
  font-weight: 600;
}
.cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Photo */
.hero-photo {
  flex-shrink: 0;
}
.photo-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--border);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.08);
}

/* ─── ABOUT ──────────────────────────────────────────────────────────────── */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.about .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text h2 { margin-bottom: 24px; }
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.975rem;
}
.about-skills { display: flex; flex-direction: column; gap: 28px; }
.skill-group h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── PROJECTS ───────────────────────────────────────────────────────────── */
.projects {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.section-header { margin-bottom: 56px; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  transition-delay: var(--delay, 0ms);
}
.project-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.project-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.project-icon svg {
  width: 26px;
  height: 26px;
  color: rgba(245, 158, 11, 0.6);
  stroke-width: 1.5;
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-weight: 500;
}
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-weight: 500;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}
.project-card h3 { font-size: 1.1rem; }
.project-outcome {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}
.project-tech-note {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.6;
}
.project-links { margin-top: auto; padding-top: 4px; }
.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.project-link:hover { color: var(--text); }
.demo-link { color: var(--accent) !important; }
.demo-link:hover { color: var(--accent-dark) !important; }

/* ─── CONTACT ────────────────────────────────────────────────────────────── */
.contact {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-text h2 { margin-bottom: 20px; }
.contact-text p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin-bottom: 28px;
}
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-social {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.contact-social:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}
.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: -8px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.about-more-link {
  text-align: center;
  padding-top: 48px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: calc(var(--nav-h) + 40px);
    gap: 40px;
  }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-typed-wrapper {
    justify-content: center;
    min-height: 3.5em; /* reserve space — prevents layout shift while typing */
    align-items: flex-start;
  }
  .hero-sub { text-align: center; }
  .photo-circle { width: 220px; height: 220px; }

  .about .section-inner { grid-template-columns: 1fr; gap: 48px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
}

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