@font-face {
  font-family: "Ananda";
  src: url(../fonts/ananda.ttf) format("truetype");
  font-display: swap;
}

:root {
  --accent: #2f6ea6;
  --accent-light: #3d82c4;
  --heading: #8cbcea;
  --gold: #f2c94c;
  --ink: #e6edf3;
  --muted: #9aabbc;
  --line: #243447;
  --bg: #0e1621;
  --bg-alt: #121c29;
  --card: #162232;
  --card-2: #1b2a3d;
  --nav: rgba(10, 16, 24, 0.88);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; display: block; }

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: var(--nav);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.navbar .brand {
  font-family: "Ananda", cursive;
  font-size: 28px;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}
.navbar ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.navbar ul a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 17px;
  transition: background 0.2s;
}
.navbar ul a:hover, .navbar ul a.active { background: rgba(255, 255, 255, 0.15); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  margin: 5px 0;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.navbar.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.open .nav-toggle span:nth-child(2) { opacity: 0; }
.navbar.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
#hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: #222 url(../images/hero.jpg) center 30% / cover no-repeat;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.7));
}
.hero-content { position: relative; padding: 80px 24px 60px; }
#hero-section h1 {
  font-family: "Ananda", cursive;
  font-weight: normal;
  font-size: clamp(52px, 10vw, 96px);
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
#hero-section h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 8px 0 6px;
}
.hero-tags { margin: 0 0 28px; opacity: 0.85; font-size: 17px; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-caption {
  position: absolute;
  bottom: 14px; right: 20px;
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, color 0.2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,0.8); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; background: var(--bg); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: #232a31; color: #fff; }
.section-title {
  font-size: clamp(30px, 4vw, 40px);
  margin: 0 0 12px;
  color: var(--accent);
}
.section-dark .section-title { color: #fff; }
.section-intro { color: var(--muted); margin: 0 0 40px; max-width: 640px; }
.section-dark .section-intro { color: rgba(255,255,255,0.75); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: center;
}
.photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #3d6e99 0%, #1f4e79 55%, #0f2b45 100%);
  box-shadow: var(--shadow);
}
.about-text p { margin: 0 0 14px; }
.facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.facts li {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
}
.facts strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Resume ---------- */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 28px;
}
.subhead { font-size: 20px; margin: 0 0 18px; }
.skill-group { margin-bottom: 18px; }
.skill-group h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 14px;
}
.tags.small li { font-size: 13px; padding: 3px 11px; background: var(--bg-alt); border-color: transparent; }

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-left: 2px solid var(--line);
}
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
}
.timeline .when { font-size: 13px; font-weight: 600; color: var(--accent); }
.timeline h4 { margin: 2px 0 4px; font-size: 16px; }
.timeline p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Projects ---------- */
.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { margin: 0; font-size: 22px; }
.project-body p { margin: 0; }
.project-sub { color: var(--muted); font-size: 15px; margin-top: -6px !important; }
.project .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.points { margin: 0; padding-left: 20px; }
.points li { margin-bottom: 4px; }

.badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
}
.badge.live { background: #e3f6e8; color: #19723a; }
.badge.live::before { content: "● "; }

.project.featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  margin-bottom: 32px;
}
.project.featured .project-media { background: #0d2a1d; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.project.featured .project-media img { border-radius: 8px; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumbs img { height: 130px; width: 100%; object-fit: cover; object-position: top; }
.project.featured .project-media > a > img { width: 100%; height: auto; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.project-grid .project-media {
  height: 240px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-grid .project-media > img, .project-grid .project-media > video { width: 100%; height: 100%; object-fit: cover; }

.project-media.phones { gap: 10px; padding: 14px; background: #ece9f5; }
.project-media.phones a { height: 100%; }
.project-media.phones img { height: 100%; width: auto; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.project-media.schema {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px;
  background: linear-gradient(135deg, #1f4e79, #163a5a);
}
.schema-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.schema-box strong { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.schema-box span { font-size: 34px; font-weight: 700; line-height: 1.1; }

.project-media.placeholder {
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 12px, #eceff2 12px, #eceff2 24px);
}
.project-media.placeholder svg { width: 64px; height: 64px; fill: #9aa5af; }

.project-media.flow {
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px;
  background: linear-gradient(135deg, #2b2f45, #1b1d2b);
}
.project-media.flow span {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 600;
}
.project-media.flow i { color: var(--gold); font-style: normal; font-weight: 700; }

.video-embed { position: relative; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Contact ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  overflow-wrap: anywhere;
}
.contact-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.contact-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.contact-card .value { font-size: 17px; font-weight: 600; }

footer {
  background: #1b2026;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 22px 16px;
  font-size: 14px;
}
footer p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .project.featured { grid-template-columns: 1fr; }
  .resume-grid { grid-template-columns: 1fr; gap: 36px; }
  .about { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .photo { max-width: 260px; margin: 0 auto; }
  .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .project-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .navbar ul {
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--nav);
    display: none;
  }
  .navbar.open ul { display: flex; }
  .navbar ul a { padding: 12px; }
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .facts { grid-template-columns: 1fr; }
  .project-media.phones { overflow-x: auto; justify-content: flex-start; }
  .hero-caption { left: 16px; right: 16px; text-align: center; }
}

/* ---------- Dark theme overrides ---------- */
a { color: var(--heading); }
.section-title { color: #fff; }
.section-title::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--heading));
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-dark { background: linear-gradient(180deg, var(--bg) 0%, #0a1119 100%); }
.subhead { color: #fff; }
.facts li { background: var(--card); border: 1px solid var(--line); }
.tags li { background: var(--card); border-color: var(--line); color: var(--ink); }
.tags.small li { background: var(--card-2); color: #c9d6e2; }
.timeline .when { color: var(--heading); }
.timeline li::before { background: var(--accent-light); border-color: var(--bg-alt); box-shadow: 0 0 0 3px rgba(61,130,196,0.25); }
.timeline h4 { color: #fff; }
.btn-outline { color: var(--heading); border-color: var(--heading); }
.btn-outline:hover { background: var(--heading); color: var(--bg); }
.project {
  background: var(--card);
  border-color: var(--line);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.project:hover { transform: translateY(-3px); border-color: #34506e; box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
.project-body h3 { color: #fff; }
.project-grid .project-media { background: var(--card-2); }
.project-media.phones { background: linear-gradient(135deg, #241f3d, #1a1730); }
.project-media.schema { background: linear-gradient(135deg, #1f4e79, #122f4c); }
.project-media.placeholder {
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #162232, #162232 12px, #1a283a 12px, #1a283a 24px);
}
.project-media.placeholder svg { fill: #4f6a85; }
.badge.live { background: rgba(46, 160, 90, 0.15); color: #5fd38b; }
.photo img { box-shadow: 0 0 0 6px rgba(140,188,234,0.12), var(--shadow); }
.contact-card { background: var(--card); border-color: var(--line); }
.contact-card:hover { background: var(--card-2); border-color: #34506e; }
footer { background: #0a1119; border-top: 1px solid var(--line); }
::selection { background: var(--accent); color: #fff; }
.project-grid .project-media.flow { background: linear-gradient(135deg, #25304a, #161c2b); }
