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

:root {
  --bg:         #111116;
  --bg2:        #1a1a22;
  --accent:     #64FFDA;
  --accent-dk:  #4ecdc4;
  --white:      #ffffff;
  --gray:       #9ca3af;
  --gray-dim:   #4b5563;
  --border:     #2a2a35;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  height: 72px;
  background: rgba(17,17,22,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── HERO ────────────────────────────────────── */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 72px 80px 0;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.hero-content { flex: 1; max-width: 560px; z-index: 2; }

/* Small label above name */
.hero-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 36px; height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Name — dominant element */
.hero-name {
  font-size: 86px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero-name .dot { color: var(--accent); }

/* Role / title */
.hero-role {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

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

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  border: none;
  padding: 14px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-dk); transform: translateY(-2px); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, color .2s, transform .15s;
  display: inline-block;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── HERO PHOTO ───────────────────────────────── */
.hero-photo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 520px;
}

.bracket-l, .bracket-r {
  position: absolute;
  font-size: 200px;
  font-weight: 200;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  user-select: none;
  font-family: 'Inter', monospace;
  top: 50%; transform: translateY(-50%);
}
.bracket-l { left: 0; }
.bracket-r { right: 0; }

.photo-ring {
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 80px rgba(100,255,218,0.12);
}

/* background-size controls zoom — increase % to zoom in, decrease to zoom out */
.photo-inner {
  width: 100%; height: 100%;
  background: url('assets/img/headshot.jpg') center 8% / 85% no-repeat;
  background-color: #1a0e0a;
  filter: grayscale(100%) contrast(1.08);
}

/* ── TICKER ──────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: rgba(26,26,34,0.9);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 36px;
  white-space: nowrap;
}
.ticker-dot {
  color: var(--accent);
  padding: 0 4px;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTIONS ────────────────────────────────── */
section { padding: 100px 80px; }

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 52px;
}

/* ── ABOUT ───────────────────────────────────── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 80px;
  align-items: start;
}

.services-list { display: flex; flex-direction: column; }

.service-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.service-item:first-child { border-top: 1px solid var(--border); }

.service-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.service-icon { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.service-name { font-size: 16px; font-weight: 600; }

.about-right p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 18px;
}
.about-right p:last-of-type { margin-bottom: 44px; }

.stats-row { display: flex; gap: 52px; flex-wrap: wrap; }

.stat-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}
.stat-num span { color: var(--accent); font-size: 30px; }
.stat-label { font-size: 13px; color: var(--gray); margin-top: 5px; }

/* ── PROJECTS ────────────────────────────────── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(100,255,218,0.08);
  border: 1px solid rgba(100,255,218,0.22);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 20px;
}

.project-name { font-size: 22px; font-weight: 700; margin-bottom: 8px; }

.project-origin {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 14px;
  opacity: 0.85;
  font-style: italic;
}

.project-desc {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 28px;
}

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

.stack-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 3px 10px;
}

/* ── CONTACT ─────────────────────────────────── */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-group label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea { min-height: 150px; }

.form-status {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  min-height: 20px;
}
.form-status.success { color: #4ade80; }
.form-status.error   { color: #f87171; }

.contact-info h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.contact-info > p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 36px;
}

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

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--gray);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.contact-link:hover { color: var(--white); }

.contact-link-icon {
  width: 42px; height: 42px;
  border-radius: 9px;
  background: rgba(100,255,218,0.08);
  border: 1px solid rgba(100,255,218,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: background .2s;
}
.contact-link:hover .contact-link-icon { background: rgba(100,255,218,0.16); }

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-size: 18px; font-weight: 800; letter-spacing: 0.06em; }
.footer-logo span { color: var(--accent); }
footer p { font-size: 13px; color: var(--gray-dim); }

/* ── RESPONSIVE ──────────────────────────────── */

/* Tablet landscape */
@media (max-width: 1100px) {
  nav, section, footer { padding-left: 40px; padding-right: 40px; }
  #home { padding: 72px 40px 0; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .hero-name { font-size: 70px; }
  .photo-ring { width: 340px; height: 340px; }
}

/* Tablet portrait / large phone */
@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 16px; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }

  #home {
    flex-direction: column-reverse;
    padding: 96px 24px 56px;
    min-height: auto;
    gap: 40px;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-label { justify-content: center; }
  .hero-ctas { justify-content: center; }
  .hero-name { font-size: 60px; }
  .hero-role { font-size: 15px; }

  .hero-photo { min-height: auto; width: 100%; }
  .photo-ring { width: 240px; height: 240px; }
  .bracket-l { font-size: 110px; left: calc(50% - 180px); }
  .bracket-r { font-size: 110px; right: calc(50% - 180px); }

  section { padding: 72px 24px; }
  .section-title { font-size: 32px; margin-bottom: 36px; }

  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats-row { gap: 28px; }
  .stat-num { font-size: 36px; }

  footer {
    flex-direction: column;
    gap: 10px;
    padding: 28px 24px;
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 390px) {
  nav { padding: 0 16px; }
  .nav-logo { font-size: 18px; }

  #home { padding: 88px 16px 48px; gap: 32px; }
  .hero-name { font-size: 48px; }
  .hero-role { font-size: 13px; letter-spacing: 0.1em; }
  .photo-ring { width: 200px; height: 200px; }
  .bracket-l { font-size: 90px; left: calc(50% - 155px); }
  .bracket-r { font-size: 90px; right: calc(50% - 155px); }

  .btn-primary, .btn-secondary { padding: 12px 22px; font-size: 14px; width: 100%; text-align: center; }
  .hero-ctas { flex-direction: column; align-items: center; gap: 12px; }

  section { padding: 60px 16px; }
  .section-title { font-size: 28px; }

  .project-card { padding: 24px; }
  .stats-row { gap: 20px; flex-wrap: wrap; }
  .stat-num { font-size: 32px; }
}

/* Prevent any horizontal overflow globally */
html, body { max-width: 100%; overflow-x: hidden; }
