@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Default Light Theme */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --blue: #0284c7;
  --violet: #7c3aed;
  --line: rgba(15, 23, 42, 0.12);
  --glow-1: rgba(124, 58, 237, 0.12);
  --glow-2: rgba(2, 132, 199, 0.15);
  --mono: "DM Mono", monospace;
  --sans: "Outfit", sans-serif;
}

/* Automatic Dark Mode based on device/OS setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080b14;
    --surface: #101522;
    --text: #f3f4f6;
    --muted: #a2a8b8;
    --blue: #77d5ff;
    --violet: #9d8cff;
    --line: rgba(255, 255, 255, 0.12);
    --glow-1: #372b6440;
    --glow-2: #083d6233;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); overflow-x: hidden; }

.page-glow {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 84% 5%, var(--glow-1) 0, transparent 28%),
              radial-gradient(circle at 10% 45%, var(--glow-2) 0, transparent 30%);
  z-index: -1;
}

.section { max-width: 1240px; margin: auto; padding: 8rem 2rem; }
.site-header { height: 78px; max-width: 1360px; padding: 0 3rem; margin: auto; display: flex; align-items: center; justify-content: space-between; }

.brand { color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 1.4rem; letter-spacing: -2px; }
.brand span { color: var(--blue); }

nav { display: flex; align-items: center; gap: 2rem; }
nav a { font-size: 0.88rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
nav a:hover { color: var(--text); }
.nav-contact { color: var(--text); border: 1px solid var(--line); padding: 0.55rem 0.9rem; border-radius: 99px; }
.nav-contact span { color: var(--blue); }
.menu-toggle { display: none; }

.hero { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; position: relative; padding-top: 4rem; }
.eyebrow, .overline { font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); }
.eyebrow span { display: inline-block; width: 7px; height: 7px; background: var(--blue); border-radius: 50%; margin-right: 0.55rem; box-shadow: 0 0 10px var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.2rem, 6.4vw, 6.1rem); line-height: 0.96; letter-spacing: -0.065em; margin: 1.25rem 0 1.75rem; font-weight: 700; }
em { font-style: normal; color: var(--blue); font-family: Georgia, serif; font-weight: 400; letter-spacing: -0.08em; }
.hero-intro { max-width: 540px; font-size: 1.12rem; line-height: 1.6; color: var(--muted); }
.hero-intro strong, .about-text strong { font-weight: 500; color: var(--text); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.button { padding: 0.9rem 1.2rem; text-decoration: none; border-radius: 5px; font-size: 0.86rem; font-weight: 600; transition: transform 0.2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: #ffffff; }
.button-primary span { margin-left: 1.2rem; font-size: 1.1rem; }
.button-secondary { border: 1px solid var(--line); color: var(--text); }
.text-link { color: var(--text); font-size: 0.86rem; text-decoration: none; padding: 0.9rem; }
.text-link span { color: var(--blue); padding-left: 0.3rem; }

.hero-visual { height: 480px; position: relative; }
.core { position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%); width: 135px; height: 135px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #7adeff, #5267e2 44%, #172054 70%); box-shadow: 0 0 45px rgba(92, 114, 255, 0.4), inset -15px -15px 30px #10153d; color: #fff; font: 1.8rem var(--mono); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid var(--line); border-radius: 50%; transform: translate(-50%, -50%) rotate(-25deg); }
.orbit-one { width: 350px; height: 190px; }
.orbit-two { width: 215px; height: 420px; transform: translate(-50%, -50%) rotate(52deg); border-color: var(--line); }
.coordinate, .system-label { position: absolute; font: 400 0.64rem var(--mono); line-height: 1.6; letter-spacing: 0.08em; color: var(--muted); }
.coord-one { left: 7%; top: 20%; }
.coord-two { right: 2%; bottom: 20%; }
.system-label { right: 6%; top: 20%; color: var(--blue); }
.scroll-prompt { position: absolute; left: 2rem; bottom: 1.4rem; text-decoration: none; color: var(--muted); font: 400 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.scroll-prompt span { display: inline-block; width: 30px; height: 1px; background: var(--blue); vertical-align: middle; margin-right: 0.7rem; }

.section-label { border-top: 1px solid var(--line); padding-top: 1rem; color: var(--muted); font: 400 0.67rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.section-label span { color: var(--blue); padding-right: 0.7rem; }

.about-content { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 4rem; padding: 4.8rem 9% 5rem; }
.about h2, .skills h2, .credentials h2, .work h2, .contact h2 { font-size: clamp(2.7rem, 5vw, 4.7rem); line-height: 1; letter-spacing: -0.06em; margin: 0.8rem 0; }
.about-text { padding-top: 2.5rem; }
.about-text p { line-height: 1.7; color: var(--muted); font-size: 1.02rem; }

.credentials-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.credentials-strip div { padding: 1.5rem; border-right: 1px solid var(--line); }
.credentials-strip div:last-child { border: 0; }
.credentials-strip span { display: block; font: 500 1.5rem var(--mono); color: var(--blue); margin-bottom: 0.5rem; }
.credentials-strip small { color: var(--muted); }

.skills-heading, .work-heading { display: flex; justify-content: space-between; align-items: end; padding: 4.5rem 9% 3.5rem; }
.skills-heading p, .work-heading > p { color: var(--muted); max-width: 280px; line-height: 1.6; font-size: 0.95rem; }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.skill-card { background: var(--surface); padding: 1.5rem; min-height: 285px; position: relative; overflow: hidden; }
.skill-card:before { content: ""; position: absolute; inset: auto -25% -55% auto; width: 170px; height: 170px; border-radius: 50%; filter: blur(3px); opacity: 0.25; }
.card-code:before { background: var(--blue); }
.card-ai:before { background: var(--violet); }
.card-cloud:before { background: #5086ff; }
.card-create:before { background: #de6bff; }
.card-icon { font: 1.6rem var(--mono); color: var(--blue); }
.card-number { position: absolute; right: 1.5rem; top: 1.5rem; font: 400 0.65rem var(--mono); color: var(--muted); }
.skill-card h3 { font-size: 1.35rem; letter-spacing: -0.04em; line-height: 1.05; margin: 4.5rem 0 1.2rem; }
.skill-card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8rem; line-height: 1.8; }

.credentials-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; padding: 4.8rem 9%; }
.credential-links { display: grid; gap: 0.8rem; }
.credential-links a { border: 1px solid var(--line); background: var(--surface); padding: 1rem; display: flex; align-items: center; gap: 1rem; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.credential-links a:hover { border-color: var(--blue); transform: translateX(4px); }
.link-mark { display: grid; place-items: center; border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 50%; font: bold 0.85rem var(--sans); color: var(--blue); }
.credential-links strong, .credential-links small { display: block; }
.credential-links small { margin-top: 0.2rem; font-size: 0.72rem; color: var(--muted); }
.credential-links b { margin-left: auto; color: var(--blue); }

.recognition-list { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 1.3fr; padding: 1.7rem 9%; gap: 2rem; }
.recognition-list > div { display: flex; align-items: center; gap: 0.8rem; }
.recognition-list p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin: 0; }
.recognition-list strong { color: var(--text); }
.badge-google, .badge-github { font: 600 1.2rem var(--sans); color: var(--blue); }

.work-heading { padding-bottom: 3rem; }
.showcase-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; }
.project-art { height: 300px; position: relative; overflow: hidden; }
.project-blender .project-art { background: radial-gradient(circle at 50% 35%, #a4e4ff, #6a5fd4 27%, #222052 54%, #0f1328 74%); }
.sphere { position: absolute; width: 130px; height: 130px; border-radius: 50%; background: linear-gradient(135deg, #e1fcff, #459be7 50%, #3e257c); left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: -18px 17px 30px rgba(9, 8, 30, 0.6); }
.ring { position: absolute; border: 3px solid #d4e7ff; width: 260px; height: 105px; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-22deg); }
.project-canva .project-art { padding: 1.8rem; background: #e3d5fa; color: #141229; font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 800; line-height: 0.86; letter-spacing: -0.08em; }
.project-canva i { font: italic 1em Georgia, serif; color: #6b43ba; }
.project-video .project-art { background: linear-gradient(135deg, #0f344f, #02050b 65%); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 65px; height: 65px; border: 1px solid var(--blue); border-radius: 50%; display: grid; place-items: center; color: var(--blue); padding-left: 3px; }
.video-line { position: absolute; bottom: 20px; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, var(--blue) 45%, rgba(255, 255, 255, 0.27) 45%); }

.project-info { padding: 1.1rem 0; }
.project-info span { font: 400 0.65rem var(--mono); color: var(--blue); }
.project-info h3 { font-size: 1.25rem; margin: 0.4rem 0 0.25rem; letter-spacing: -0.04em; }
.project-info p { font-size: 0.8rem; color: var(--muted); margin: 0; }

.contact { text-align: center; padding-block: 9rem; }
.contact h2 { font-size: clamp(3.4rem, 7vw, 6.5rem); }
.contact-row { margin: 3rem auto 0; display: flex; justify-content: center; align-items: center; gap: 3rem; }
.contact-form { display: flex; border-bottom: 1px solid var(--blue); }
.contact-form input { width: 200px; border: 0; background: transparent; color: var(--text); font: 400 0.88rem var(--sans); outline: 0; }
.contact-form input::placeholder { color: var(--muted); }
.email-link { font-size: 1.1rem; color: var(--text); background: transparent; border: 0; padding: 0 0 0.4rem; white-space: nowrap; cursor: pointer; }
.email-link span { color: var(--blue); }
.contact-row p { text-align: left; color: var(--muted); font-size: 0.8rem; line-height: 1.6; margin: 0; }

footer { border-top: 1px solid var(--line); max-width: 1240px; margin: auto; padding: 2rem; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.76rem; }
footer > div { display: flex; gap: 1.2rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--blue); }

@media (max-width: 760px) {
  .site-header { padding: 0 1.3rem; }
  .menu-toggle { display: grid; gap: 5px; background: none; border: 0; padding: 0.5rem; }
  .menu-toggle span:not(.sr-only) { display: block; background: var(--text); width: 21px; height: 1px; }
  .menu-toggle[aria-expanded=true] span:nth-child(2) { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }
  nav { display: none; position: absolute; z-index: 10; left: 0; right: 0; top: 78px; padding: 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 1.3rem; }
  nav.open { display: flex; }
  .section { padding: 5rem 1.3rem; }
  .hero { display: block; min-height: 750px; padding-top: 3rem; }
  .hero-visual { height: 310px; margin-top: 1rem; }
  .orbit-one { width: 270px; height: 145px; }
  .orbit-two { width: 150px; height: 300px; }
  .core { width: 100px; height: 100px; font-size: 1.3rem; }
  .coord-one { left: 0; top: 14%; }
  .coord-two { right: 0; bottom: 9%; }
  .system-label { right: 0; top: 12%; }
  .scroll-prompt { left: 1.3rem; }
  .about-content, .credentials-layout { grid-template-columns: 1fr; gap: 1rem; padding: 3.5rem 0; }
  .about-text { padding: 0; }
  .credentials-strip { grid-template-columns: 1fr; }
  .credentials-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .skills-heading, .work-heading { display: block; padding: 3.5rem 0 2.5rem; }
  .skills-heading p, .work-heading > p { margin-top: 1.5rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .skill-card { min-height: 245px; padding: 1.1rem; }
  .skill-card h3 { margin-top: 3.8rem; font-size: 1.1rem; }
  .recognition-list { grid-template-columns: 1fr; padding: 1.5rem 0; gap: 1rem; }
  .showcase-grid { grid-template-columns: 1fr; }
  .project-art { height: 240px; }
  .contact { padding-block: 6rem; }
  .contact-row { display: block; }
  .contact-form { justify-content: center; margin-top: 1.5rem; }
  .contact-row p { text-align: center; margin-top: 1.5rem; }
  footer { padding: 1.5rem 1.3rem; flex-wrap: wrap; gap: 1.3rem; }
  footer > div { width: 100%; order: 3; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .credential-links a { transition: none; }
}
/* Email Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 20, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2.2rem;
  border-radius: 12px;
  max-width: 440px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.modal-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-actions .button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1.8rem;
}

.filter-pill,
.project-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font: 500 0.72rem var(--mono);
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover,
.project-pill:hover {
  color: var(--text);
  border-color: var(--blue);
}

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

.project-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.project-card.hidden {
  display: none;
}

.project-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.88rem;
}

.project-card a {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.84rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

.stat-card,
.languages-card,
.prompt-card,
.article-card,
.testimonial-card {
  border: 1px solid var(--line);
  background: var(--surface);
}

.stat-card {
  padding: 1rem;
}

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

.stat-card strong {
  margin-top: 0.8rem;
  display: block;
  font-size: 1.5rem;
}

.languages-card {
  margin-top: 1rem;
  padding: 1.2rem;
}

.languages-card ul {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

.prompt-card {
  padding: 1.4rem;
}

.prompt-card p {
  color: var(--muted);
}

.prompt-card pre {
  overflow: auto;
  margin: 1rem 0;
  padding: 1rem;
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
  font-size: 0.82rem;
}

.copy-status {
  min-height: 1.2rem;
  color: var(--blue);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

.article-grid,
.testimonial-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.article-card,
.testimonial-card {
  padding: 1.2rem;
}

.article-card h3,
.testimonial-card cite {
  margin-top: 0;
}

.article-card p,
.testimonial-card {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.testimonial-card {
  margin: 0;
}

.testimonial-card cite {
  display: block;
  margin-top: 0.9rem;
  color: var(--text);
  font-style: normal;
  font-size: 0.8rem;
}

@media (max-width: 1000px) {
  .project-cards,
  .article-grid,
  .testimonial-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .project-cards,
  .article-grid,
  .testimonial-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .project-filters {
    margin-top: 1.4rem;
  }
}
