:root {
  --bg: #020617;
  --bg-alt: #050816;
  --accent: #38bdf8;
  --accent2: #22c55e;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --card: rgba(15, 23, 42, 0.85);
  --border: rgba(148, 163, 184, 0.25);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

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

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top, #1f2937 0, #020617 45%, #000 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
  font-size: 0.9rem;
}

nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  transition: width 0.2s ease-out;
}

nav a:hover::after {
  width: 100%;
}

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

nav a.active::after {
  width: 100%;
}

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

section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

/* ====== Hero (Home) ====== */

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

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.hero-title span {
  background: linear-gradient(to right, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
}

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

.btn-primary,
.btn-ghost {
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background 0.15s ease-out,
    border-color 0.15s ease-out;
}

.btn-primary {
  background: linear-gradient(to right, var(--accent), var(--accent2));
  color: #020617;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.6);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent);
  color: var(--text);
}

/* Banner (photo + card) */

.banner-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #020617;
}

.banner-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero right (photo + card) */

.hero-right {
  position: relative;
  padding: 1.4rem;
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.16), transparent 55%),
    rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.hero-photo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent2), var(--accent));
  margin-bottom: 1rem;
  animation: float 6s ease-in-out infinite;
}

.hero-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: #020617;
}

.hero-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.hero-role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.hero-bio {
  font-size: 0.85rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
}

.meta-item {
  padding: 0.6rem 0.7rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.1rem;
}

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

.hero-clouds {
  margin-top: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(55, 65, 81, 0.8);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-clouds span {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

/* ====== Metrics (Home) ====== */

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

.metric {
  background: var(--card);
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  padding: 0.8rem;
  font-size: 0.8rem;
  backdrop-filter: blur(16px);
}

.metric-label {
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.metric-trend {
  font-size: 0.7rem;
  margin-top: 0.1rem;
  color: #4ade80;
}

/* ====== Timeline (Experience) ====== */

.timeline {
  border-left: 1px solid rgba(55, 65, 81, 0.9);
  padding-left: 1.2rem;
  margin-left: 0.4rem;
  display: grid;
  gap: 1.6rem;
}

.timeline-item {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  backdrop-filter: blur(16px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 1.1rem;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #020617;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.timeline-role {
  font-weight: 500;
  font-size: 0.95rem;
}

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

.timeline-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.timeline-body {
  font-size: 0.85rem;
  color: #d1d5db;
}

.timeline-body ul {
  margin-top: 0.3rem;
  padding-left: 1.1rem;
}

.timeline-body li {
  margin-bottom: 0.2rem;
}

/* ====== Cards / Grid (Projects) ====== */

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

.card {
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  transform: translateY(0);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.card-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.card-pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--muted);
}

.card-body {
  color: #d1d5db;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.card-tags span {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
  color: var(--muted);
}

.card-links {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  display: flex;
  gap: 0.7rem;
}

.card-links a {
  color: var(--accent);
}

.card-links a:hover {
  text-decoration: underline;
}

/* ====== Skills ====== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.8rem;
}

.skills-group {
  background: var(--card);
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  padding: 0.8rem;
  backdrop-filter: blur(16px);
}

.skills-group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.skills-group ul {
  list-style: none;
}

.skills-group li {
  margin-bottom: 0.2rem;
  color: #e5e7eb;
}

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

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

.contact-text {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 0.8rem;
}

.contact-list {
  font-size: 0.85rem;
  display: grid;
  gap: 0.25rem;
}

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

.contact-list a {
  color: var(--accent);
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-card {
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  font-size: 0.8rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
}

.contact-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  gap: 0.5rem;
}

.contact-card-label {
  color: var(--muted);
}

.contact-card-value {
  font-weight: 500;
}

.contact-form {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.contact-form label {
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.85rem;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

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

footer {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding-top: 1rem;
}

/* ====== Animations / Scroll reveal ====== */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

/* ====== Responsive ====== */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-right {
    order: -1;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skills-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  nav {
    font-size: 0.8rem;
    gap: 1rem;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .skills-grid,
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  main {
    padding-inline: 1rem;
  }
}
