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

:root {
  --bg: #0a0a0a;
  --bg-card: #111;
  --text: #f0f0f0;
  --muted: #777;
  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.15);
  --border: #1c1c1c;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --nav-h: 72px;
  --max-w: 1200px;
  --radius: 10px;
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --bg-card: #fff;
  --text: #111;
  --muted: #666;
  --accent: #6d8a00;
  --accent-dim: rgba(109, 138, 0, 0.1);
  --border: #e0e0e0;
  --glass: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Animations ===== */

.anim-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.7s ease forwards;
}
.anim-d1 { animation-delay: 0.15s; }
.anim-d2 { animation-delay: 0.3s; }
.anim-d3 { animation-delay: 0.45s; }
.anim-d4 { animation-delay: 0.6s; }
.anim-d5 { animation-delay: 0.75s; }

.anim-fade {
  opacity: 0;
  animation: fadeIn 1s ease 0.4s forwards;
}

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

@keyframes fadeIn {
  to { opacity: 1; }
}

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

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

/* ===== Nav ===== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(245, 245, 245, 0.85);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

.nav__logo {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 32px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.3s ease;
}

.theme-toggle:hover {
  color: var(--accent);
}

.icon--moon { display: none; }
.icon--sun { display: block; }
[data-theme="light"] .icon--sun { display: none; }
[data-theme="light"] .icon--moon { display: block; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== Hero ===== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 40px 0;
}

.hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  padding-top: var(--nav-h);
  gap: 40px;
}

.hero__text {
  flex: 1;
  max-width: 600px;
}

.hero__greeting {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 400;
}

.hero__name {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero__title {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 400;
}

.hero__about {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero__contact-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  max-width: 380px;
}

.hero__contact-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero__email {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.3s ease;
}

.hero__email:hover {
  color: var(--accent);
}

.hero__bottom {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero__socials {
  display: flex;
  gap: 12px;
}

.hero__socials a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.hero__socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero__socials svg {
  width: 16px;
  height: 16px;
}

.hero__tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 30px;
  padding: 10px 20px;
}

.hero__tagline-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* --- Photo --- */

.hero__photo {
  position: relative;
  flex-shrink: 0;
}

.hero__photo-inner {
  width: 400px;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 1px solid var(--border);
}

[data-theme="light"] .hero__photo-inner {
  background: linear-gradient(135deg, #eee 0%, #ddd 100%);
}

.hero__photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero__photo-glow {
  position: absolute;
  top: 20%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: var(--accent);
  opacity: 0.06;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* ===== Sections ===== */

.section {
  padding: 56px 0;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.section__title::after {
  content: ".";
  color: var(--accent);
}

/* ===== About ===== */

.about-block {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.about__text {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 620px;
}

.about__highlights {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}

.about__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.about__stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.about__stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== Experience ===== */

.exp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 12px 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.exp__period {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}

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

.exp__company {
  font-weight: 600;
  font-size: 1.05rem;
}

.exp__role {
  font-size: 0.85rem;
  color: var(--muted);
}

.exp__projects {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 4px;
}

/* ===== Cards ===== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tag:hover {
  transform: translateY(-1px);
}

/* ===== Skills (buttons + panels) ===== */

.skills-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

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

.skill-btn.open {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

[data-theme="light"] .skill-btn.open {
  color: #fff;
}

.skill-btn__arrow {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s ease;
}

.skill-btn.open .skill-btn__arrow {
  transform: rotate(45deg);
}

.skills-panels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-panels:has(.skill-panel.open) {
  margin-top: 12px;
}

.skill-panel {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  animation: panelIn 0.3s ease;
}

.skill-panel.open {
  display: flex;
}

.skill-panel__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-right: 4px;
}

.skill-panel .tag {
  font-size: 0.78rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 4px;
}

.skill-panel .tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Badges ===== */

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.badge:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.badge__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 50%;
  color: var(--accent);
}

.badge__icon svg {
  width: 22px;
  height: 22px;
}

.badge__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge__name {
  font-weight: 700;
  font-size: 1rem;
}

.badge__title {
  font-size: 0.8rem;
  color: var(--muted);
}

.badge__cta {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: transform 0.3s ease;
}

.badge:hover .badge__cta {
  transform: translateX(4px);
}

/* ===== Contact ===== */

.section--contact {
  text-align: center;
}

.section--contact .section__title {
  display: inline-block;
}

.contact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer__info {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer__info .sep {
  margin: 0 8px;
  opacity: 0.3;
}

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== Mobile ===== */

@media (max-width: 900px) {
  .hero__content {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-h) + 24px);
  }

  .hero__text {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__about {
    max-width: 100%;
  }

  .hero__contact-bar {
    max-width: 100%;
    width: 100%;
    align-items: center;
  }

  .hero__bottom {
    justify-content: center;
  }

  .hero__photo-inner {
    width: 260px;
    height: 320px;
  }

  .about-block {
    flex-direction: column;
    gap: 28px;
    padding: 24px;
    text-align: center;
    border-left: none;
    border-top: 3px solid var(--accent);
    overflow: hidden;
  }

  .about__text {
    max-width: 100%;
  }

  .about__highlights {
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
  }

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

  .section {
    padding: 44px 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .nav {
    padding: 0 20px;
  }

  .hero__content {
    padding: 0 20px;
    padding-top: calc(var(--nav-h) + 16px);
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0;
    z-index: 199;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li {
    list-style: none;
  }

  .nav__links a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    text-align: left;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero__name {
    font-size: 2.2rem;
  }

  .hero__photo-inner {
    width: 200px;
    height: 250px;
  }

  .hero__tagline {
    font-size: 0.75rem;
    padding: 8px 14px;
  }

  .section {
    padding: 40px 0;
  }

  .section__title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }

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

  .about-block {
    padding: 20px;
    gap: 20px;
  }

  .about__text {
    font-size: 0.95rem;
  }

  .about__highlights {
    gap: 16px;
  }

  .about__stat-number {
    font-size: 1.5rem;
  }

  .about__stat-label {
    font-size: 0.65rem;
  }

  .hero__bottom {
    flex-direction: column;
    gap: 16px;
  }

  .badges-grid {
    justify-content: center;
  }

  .badge {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .badge__cta {
    margin-left: 0;
  }

  .footer__info .sep {
    display: none;
  }

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

/* ===== Print ===== */

@media print {
  .site-header,
  .theme-toggle,
  .nav__toggle,
  .hero__photo-glow {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .anim-up,
  .anim-fade {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .anim-up, .anim-fade { opacity: 1; transform: none; }
}
