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

:root {
  --bg:          #080808;
  --bg-alt:      #0e0e0e;
  --surface:     #141414;
  --surface-2:   #1c1c1c;
  --border:      #242424;
  --border-hover:#3a3a3a;
  --accent:      #ffffff;
  --accent-dim:  rgba(255, 255, 255, 0.08);
  --accent-glow: rgba(255, 255, 255, 0.15);
  --text:        #f2efeb;
  --text-muted:  #6b6b6b;
  --text-subtle: #363636;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --nav-height:  64px;
  --radius:      10px;
  --radius-sm:   6px;
  --transition:  0.3s ease;
  --max-width:   1100px;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  opacity: 0.65;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===========================
   LAYOUT
   =========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 104px 0;
}

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

/* ===========================
   TYPOGRAPHY
   =========================== */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

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

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 52px;
  margin-top: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* ===========================
   NAV
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(8, 8, 8, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.nav--scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 8, 8, 0.92);
}

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

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo:hover {
  opacity: 0.5;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

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

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-inner {
  width: 100%;
  display: flex;
  align-items: stretch;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + 60px) 72px 80px;
  max-width: 620px;
  position: relative;
  z-index: 2;
}

/* Hero entrance animations */
.hero-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards 0.2s;
}

.hero-name {
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-dot {
  color: var(--text-muted);
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 48px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards 0.6s;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards 0.8s;
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  width: 45%;
  flex-shrink: 0;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  filter: brightness(0.88) contrast(1.05);
  display: block;
  transform: scale(1.04);
  transition: transform 8s ease;
  will-change: transform;
}

.hero-photo.loaded {
  transform: scale(1);
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(8,8,8,0.4) 25%, transparent 50%),
    linear-gradient(to top, var(--bg) 0%, transparent 15%);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #080808;
}

.btn-primary:hover {
  background: var(--text);
  color: #080808;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
}

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

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
  opacity: 1;
  transform: translateY(-2px);
}

/* ===========================
   ABOUT
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}

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

.about-bio p:last-child {
  margin-bottom: 0;
}

.focus-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 24px;
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.focus-list li {
  color: var(--text-muted);
  font-size: 0.925rem;
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.focus-list li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

/* ===========================
   EXPERIENCE
   =========================== */
.experience-list {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.exp-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.exp-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 2px;
  width: fit-content;
}

.exp-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.exp-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}

.exp-bullets li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.exp-bullets strong {
  color: var(--text);
  font-weight: 600;
}

/* ===========================
   PROJECTS
   =========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--border);
}

.project-card {
  background: var(--surface);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.35s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  background: var(--surface-2);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card--wip {
  opacity: 0.75;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-icon {
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.5;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.project-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  flex: 1;
}

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

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-subtle);
  padding: 4px 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.project-links {
  margin-top: 4px;
}

.project-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--accent);
  opacity: 1;
}

/* ===========================
   SKILLS
   =========================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--border);
}

.skill-group {
  background: var(--surface);
  padding: 32px;
  transition: background 0.3s ease;
}

.skill-group:hover {
  background: var(--surface-2);
}

.skill-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ===========================
   CONTACT
   =========================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  margin-top: 48px;
  align-items: start;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text-muted);
}

.btn-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.form-note--success {
  color: #6bcfa0;
}

.form-note--error {
  color: #cf6b6b;
}

.contact-intro {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin-top: 12px;
  margin-bottom: 48px;
  line-height: 1.8;
}

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

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  max-width: 480px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-item:hover {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.contact-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  opacity: 0.5;
}

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

.footer p {
  font-size: 0.78rem;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer a {
  color: var(--text-subtle);
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--text-muted);
  opacity: 1;
}

/* ===========================
   SCROLL ANIMATIONS
   =========================== */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===========================
   HAMBURGER
   =========================== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .hero-content {
    padding: calc(var(--nav-height) + 48px) 40px 60px;
  }

  .hero-photo-wrap {
    width: 40%;
  }

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

  .exp-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .exp-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  /* Nav — hamburger */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(8, 8, 8, 0.97);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav-links--open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }

  /* Hero */
  .hero {
    flex-direction: column;
  }

  .hero-inner {
    flex-direction: column;
    min-height: 100vh;
  }

  .hero-content {
    padding: calc(var(--nav-height) + 48px) 24px 48px;
    max-width: 100%;
  }

  .hero-photo-wrap {
    width: 100%;
    height: 360px;
    flex-shrink: 0;
  }

  .hero-photo {
    object-position: 50% 20%;
  }

  .hero-photo-overlay {
    background:
      linear-gradient(to bottom, var(--bg) 0%, transparent 20%),
      linear-gradient(to top, var(--bg) 0%, transparent 20%);
  }

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

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

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

  .section {
    padding: 72px 0;
  }

  .contact-intro {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

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

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

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .section {
    padding: 56px 0;
  }

  .section-subtitle {
    margin-bottom: 36px;
  }
}
