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

:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --border: #2a2a2a;
  --text: #f0ece4;
  --muted: #888;
  --accent: #c8a96e;
  --accent2: #4a7c6f;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-logo {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
}

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 80% 50%,
      rgba(74, 124, 111, 0.12) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 60% at 20% 80%,
      rgba(200, 169, 110, 0.08) 0%,
      transparent 60%
    );
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1100px;
}
.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.8rem;
  animation: fadeUp 0.6s ease both;
}
.hero-name {
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 7vw, 5.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-name span {
  color: var(--accent);
}
.hero-subtitle {
  margin-top: 1.2rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 480px;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--accent);
  color: #0e0e0e;
}
.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  flex-shrink: 0;
  animation: fadeUp 0.6s 0.15s ease both;
  overflow: hidden;
}
/* Placeholder avatar */
.avatar-placeholder {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface) 0%, #222 100%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  flex-shrink: 0;
  animation: fadeUp 0.6s 0.15s ease both;
}

#about {
  padding: 7rem 5%;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text {
  color: var(--muted);
  font-size: 1.05rem;
}
.about-text p + p {
  margin-top: 1rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.skill-chip {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.2s;
}
.skill-chip:hover {
  border-color: var(--accent2);
  color: var(--text);
  cursor: pointer;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.stat-number {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

#projects {
  padding: 7rem 5%;
  background: var(--surface);
}
.projects-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.25s,
    border-color 0.25s;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent2);
}
.project-thumb {
  height: 180px;
  background: linear-gradient(135deg, #1a2a26 0%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
}
.project-body {
  padding: 1.5rem;
}
.project-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.6rem;
}
.project-title {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
}
.project-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
}
.project-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.project-link:hover {
  opacity: 0.7;
}

/* ── EXPERIENCE ── */
#experience {
  padding: 7rem 5%;
  max-width: 1100px;
  margin: 0 auto;
}
.timeline {
  margin-top: 3rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.timeline-date {
  color: var(--muted);
  font-size: 0.85rem;
  padding-top: 0.2rem;
}
.timeline-role {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.timeline-company {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.timeline-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

#contact {
  padding: 7rem 5%;
  background: var(--surface);
  text-align: center;
}
.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}
.contact-text {
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}
.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatAvatar {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes rotateBorder {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.4);
  }
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.avatar-placeholder {
  animation:
    fadeUp 0.6s 0.15s ease both,
    floatAvatar 4s 1s ease-in-out infinite !important;
  position: relative;
}
.avatar-placeholder::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(200, 169, 110, 0.3);
  animation: rotateBorder 12s linear infinite;
}

.typewriter::after {
  content: "|";
  animation: blink 0.75s step-end infinite;
  color: var(--accent);
  margin-left: 2px;
}

#particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
}

/* Stat counter */
.stat {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(200, 169, 110, 0.08);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.skill-chip {
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.4s,
    transform 0.4s,
    border-color 0.2s,
    color 0.2s;
}
.skill-chip.visible {
  opacity: 1;
  transform: scale(1);
}

.project-card {
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transition: left 0.5s ease;
}
.project-card:hover::after {
  left: 140%;
}

.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.timeline-item.visible::before {
  opacity: 1;
}

.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .avatar-placeholder {
    width: 340px;
    height: 340px;
    font-size: 3rem;
    order: -1;
    margin-top: 80px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .timeline-date {
    font-size: 0.78rem;
  }
  .nav-links {
    display: none;
  }
  nav {
    justify-content: center;
    position: relative;
  }
  .nav-logo {
    justify-content: center;
    font-size: 50px;
  }
}
