/* =========================
   Theme
========================= */
:root{
  --bg:#0b0f17;
  --panel:#101828;
  --text:#e6edf7;
  --muted:#a7b3c6;
  --border:rgba(255,255,255,.10);
  --accent:#7c9cff;
  --shadow:0 12px 30px rgba(0,0,0,.35);

  --nav-h: 60px;
  --section-pad: 96px;
}

[data-theme="light"]{
  --bg:#ffffff;
  --panel:#f5f7fb;
  --text:#0b1220;
  --muted:#4c5a70;
  --border:rgba(20,30,50,.12);
  --accent:#315dff;
  --shadow:0 10px 24px rgba(20,30,50,.12);
}

/* =========================
   Base
========================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

section { scroll-margin-top: calc(var(--nav-h) + 16px); }

#contact { scroll-margin-top: calc(var(--nav-h) - 200px); }

.container{
  width: min(1100px, 92vw);
  margin: 0 auto;
}

h1,h2,h3 { margin: 0 0 10px; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); }

.muted { color: var(--muted); }
.accent { color: var(--accent); }

.link{
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}
.link:hover { text-decoration: underline; }

/* =========================
   Navbar
========================= */
.top-nav{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(7, 10, 18, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-links{
  display: flex;
  gap: 56px;
  padding: 0 28px;
}

.nav-links a{
  text-decoration: none;
  color: #cfd6ff;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  position: relative;
}

.nav-links a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-8px;
  width:0%;
  height:2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover::after{ width:100%; }

@media (max-width: 520px){
  .nav-links{ gap: 22px; }
  .nav-links a{ font-size: 1rem; letter-spacing: 0.03em; }
}

main { padding-top: var(--nav-h); }

/* =========================
   Full-screen sections
========================= */
.section{
  min-height: 100vh;
  padding: var(--section-pad) 0;
  display: flex;
  align-items: center;
}

.hero { padding-top: 0; }

/* =========================
   Buttons
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.btn.ghost{
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.btn.small{
  padding: 9px 12px;
  border-radius: 12px;
  font-size: .95rem;
}

/* Button interactions (ALL buttons) */
.btn{
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn:not(.ghost):hover{
  background-color: #5f7cff;
  box-shadow: 0 12px 30px rgba(124, 156, 255, 0.45);
}

.btn.ghost:hover{
  border-color: var(--accent);
  background: rgba(124, 156, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(124, 156, 255, 0.35),
    0 12px 30px rgba(124, 156, 255, 0.25);
}

/* Send Message button interaction */
.send-btn {
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.send-btn:hover {
  background-color: #5f7cff;
  box-shadow: 0 12px 30px rgba(124, 156, 255, 0.45);
  transform: translateY(-2px);
}
.send-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(124, 156, 255, 0.35);
}

/* =========================
   Layout blocks
========================= */
.lead{
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 60ch;
}

.cta-row{
  display:flex;
  gap:12px;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.hero-card{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);

  display:grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.section-head{ margin-bottom: 18px; }

.project-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.project-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;

  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.project-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project-images img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  cursor: pointer;
}

.project-content h3 {
  font-size: 1.45rem;
}

@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-images img {
    height: 180px;
  }
}

@media (max-width: 560px) {
  .project-images {
    grid-template-columns: 1fr;
  }
}

.tags{
  list-style:none;
  padding:0;
  margin: 12px 0 16px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tags li{
  border:1px solid var(--border);
  padding: 5px 10px;
  border-radius:999px;
  color: var(--muted);
  font-weight:800;
  font-size:.9rem;
}

.card-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.split{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
}
@media (max-width: 900px){
  .split{ grid-template-columns: 1fr; }
}

.panel{
  border:1px solid var(--border);
  background: var(--panel);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.list{
  list-style:none;
  padding:0;
  margin: 12px 0 18px;
}
.list li{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.list li:last-child{ border-bottom: 0; }
.list span:first-child{ color: var(--muted); font-weight: 800; }

.label{
  color: var(--muted);
  font-weight: 900;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.value{ font-weight: 900; }

/* =========================
   Footer
========================= */
.footer{
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
.footer-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

/* =========================
   Starfield background canvas
========================= */
#starfield{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  background: #070a12;
}
main, footer { position: relative; z-index: 1; }

/* =========================
   Contact section
========================= */
.contact-section { background: transparent; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
}

.contact-email,
.contact-phone {
  font-size: 1.2rem;
  margin-top: 12px;
  color: var(--muted);
}

.contact-email a,
.contact-phone a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.contact-email a:hover,
.contact-phone a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.contact-icons {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.contact-icons a {
  color: var(--text);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.contact-icons a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-icons .iconify {
  width: 25px;
  height: 25px;
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 100px;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  line-height: 1.6;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.send-btn {
  align-self: flex-start;
  border-radius: 999px;
  padding: 12px 24px;
}

/* =========================
   Education card (fixed layout)
========================= */
.edu-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.edu-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.edu-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  border: 1px solid var(--border);
  font-size: 1.2rem;
}

.edu-gpa { text-align: right; }

.edu-meta {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  margin-top: 6px;
}

.edu-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.edu-courses { margin-top: 2px; }

.edu-tags {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-tags li {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Hero quick card fixes */
.hero-quick h3 { margin-bottom: 10px; }
.hero-quick .list { margin-bottom: 18px; }
.hero-quick .btn { align-self: flex-start; }
.hero-card.hero-quick{
  display: block;
  padding: 22px;
}
.hero-card.hero-quick .list{
  margin: 10px 0 18px;
}

/* =========================
   Skills (FULL-WIDTH under About + Education)
========================= */
#about .split {
  margin-bottom: 18px; /* space between top row and skills row */
}

.skills-panel {
  margin-top: 6px;
}

.skills-title {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* drop to 2 columns on smaller screens */
@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* drop to 1 column on very small screens */
@media (max-width: 520px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-card {
  background: linear-gradient(
    180deg,
    #121826,
    #0c1220
  );
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px 18px;

  display: flex;
  align-items: center;
  gap: 14px;

  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-card img {
  width: 28px;
  height: 28px;
}

.skill-card span {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* =========================
   Skills panel: remove outer background
========================= */

.skills-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.image-modal img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.image-modal-close {
  position: fixed;
  top: 24px;
  right: 36px;
  color: white;
  font-size: 42px;
  font-weight: bold;
  cursor: pointer;
}