:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #87ceeb;
  --accent-dark: #3aa8d8;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
  --radius: 16px;
  --maxw: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

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

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: var(--accent);
  color: #0b2533;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

@media (min-width: 861px) {
  .hero-inner {
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text .tagline,
  .hero-text .sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-text .btn-row {
    justify-content: center;
  }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--accent-dark);
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 540px;
}

.hero p.sub {
  margin: 20px 0 30px;
  color: var(--muted);
  max-width: 560px;
}

.hero-logo img {
  width: clamp(180px, 20vw, 300px);
  height: auto;
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0b2533;
  box-shadow: 0 8px 20px rgba(58, 168, 216, 0.3);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---------- Sections ---------- */
section {
  padding: 80px 0;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 40px;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.skill-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.skill-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30, 41, 59, 0.14);
}

.project-head {
  padding: 18px 22px;
  background: linear-gradient(135deg, #e8f6fc, #f3fbff);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.project-head img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.project-head h3 {
  font-size: 1.2rem;
}

.project-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.stack span {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.project-links {
  margin-top: auto;
  display: flex;
  gap: 14px;
  font-weight: 600;
  font-size: 0.92rem;
}

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

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.about-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.about-item h4 {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(135deg, #eaf6fc, #f7fcff);
  border-top: 1px solid var(--border);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-card h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--muted);
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
footer {
  padding: 30px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

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

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

/* ---------- Responsive ---------- */
@media (min-width: 861px) {
  .skills {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .featured {
    grid-column: 1 / -1;
  }

  .featured .project-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 40px;
    align-items: start;
  }

  .featured .project-links {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p.sub {
    margin-left: auto;
    margin-right: auto;
  }

  .btn-row {
    justify-content: center;
  }

  .hero-logo img {
    width: 180px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
  }

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

  .nav-toggle {
    display: block;
  }
}
