:root {
  --bg: #0b1020;
  --bg-alt: #111629;
  --bg-card: #141a30;
  --accent: #2fd18c;
  --accent-soft: rgba(47, 209, 140, 0.1);
  --text: #f6f7fb;
  --muted: #a4abc4;
  --border-subtle: #252b43;
  --danger: #ff4b81;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-subtle: 0 10px 25px rgba(0, 0, 0, 0.3);

  --header-height: 72px;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #f3f5fb;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --text: #1b2135;
  --muted: #7a8198;
  --border-subtle: #dde1f0;
  --shadow-soft: 0 14px 35px rgba(15, 26, 74, 0.08);
}

/* Global reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #18223a 0, var(--bg) 45%, #050814 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  padding: 5rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.3));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 8, 20, 0.95), rgba(5, 8, 20, 0.88));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #2fd18c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #020308;
  box-shadow: 0 12px 30px rgba(47, 209, 140, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Navigation */

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fd18c, #33d9ff);
  transition: width 0.2s ease-out;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  width: 100%;
}

/* Nav toggle (mobile) */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

/* Hero */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
}

.hero-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.hero h1 {
  margin: 0.35rem 0;
  font-size: 2.6rem;
  letter-spacing: 0.03em;
}

.hero-role {
  margin: 0.4rem 0 0.9rem;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-description {
  margin: 0 0 1.5rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.1s ease-out, color 0.1s ease-out;
}

.btn i {
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, #2fd18c, #24b7ff);
  color: #021013;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(26, 205, 150, 0.5);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  background: rgba(20, 26, 48, 0.6);
}

.btn-ghost:hover {
  background: rgba(20, 26, 48, 0.9);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.meta-value {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Hero photo */

.hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-inner {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 32px;
  background: radial-gradient(circle at top, #2fd18c, #111629);
  padding: 6px;
  box-shadow: var(--shadow-soft);
}

.hero-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  display: block;
}

.hero-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(10, 16, 34, 0.95);
  color: var(--text);
  border: 1px solid rgba(47, 209, 140, 0.3);
  box-shadow: var(--shadow-subtle);
}

.hero-badge i {
  color: var(--accent);
}

.hero-badge-top {
  top: 10px;
  right: -5px;
}

.hero-badge-bottom {
  bottom: 10px;
  left: -5px;
}

/* Section header */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* About */

.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
}

.about-grid p {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(18, 24, 48, 0.9), rgba(8, 12, 28, 0.9));
  padding: 1.4rem 1.3rem;
}

.about-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.about-list li:last-child {
  border-bottom: none;
}

.about-list span {
  color: var(--muted);
}

.about-list strong {
  font-weight: 500;
}

/* Skills */

.skills-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skills-column {
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  background: linear-gradient(160deg, rgba(19, 27, 52, 0.95), rgba(8, 13, 26, 0.98));
  border: 1px solid var(--border-subtle);
}

.skills-column h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Timeline (experience) */

.timeline {
  display: grid;
  gap: 1.5rem;
}

.timeline-item {
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  background: linear-gradient(150deg, rgba(18, 25, 50, 0.96), rgba(12, 18, 38, 0.98));
  border: 1px solid var(--border-subtle);
}

.timeline-date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.timeline h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1rem;
}

.timeline p {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline li + li {
  margin-top: 0.2rem;
}

/* Portfolio */

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 21, 42, 0.9);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.1s ease-out, color 0.1s ease-out, border-color 0.1s ease-out, transform 0.1s ease-out;
}

.filter-btn.active {
  background: var(--accent);
  color: #021013;
  border-color: transparent;
  transform: translateY(-1px);
}

.portfolio-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.portfolio-image img {
  width: 100%;
  display: block;
  height: 160px;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.portfolio-content h3 {
  margin: 0;
  font-size: 1rem;
}

.portfolio-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.portfolio-tags span {
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.16rem 0.6rem;
}

.portfolio-link {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.portfolio-link:hover {
  text-decoration: underline;
}

/* Testimonials */

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.testimonial-card {
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  background: linear-gradient(145deg, rgba(15, 22, 44, 0.95), rgba(12, 18, 36, 0.98));
  border: 1px solid var(--border-subtle);
}

.testimonial-card p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.testimonial-meta strong {
  display: block;
  font-size: 0.9rem;
}

.testimonial-meta span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Contact */

.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  align-items: flex-start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-list i {
  width: 20px;
  text-align: center;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.social-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.1s ease-out, color 0.1s ease-out, border-color 0.1s ease-out;
}

.social-links a:hover {
  background: var(--accent);
  color: #021013;
  border-color: transparent;
}

/* Contact form */

.contact-form {
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  background: linear-gradient(150deg, rgba(17, 23, 46, 0.96), rgba(10, 16, 35, 0.98));
  border: 1px solid var(--border-subtle);
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 9, 22, 0.9);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(47, 209, 140, 0.4);
}

.form-field textarea {
  resize: vertical;
}

.form-note {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.2rem 0 1.5rem;
  background: rgba(4, 7, 18, 0.9);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.theme-toggle {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-photo-inner {
    width: 230px;
    height: 230px;
  }

  .about-grid,
  .skills-grid,
  .portfolio-grid,
  .testimonials-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    background: rgba(5, 9, 22, 0.98);
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    background: rgba(5, 9, 22, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    padding: 0.8rem 1.5rem 1rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
