/*
  styles.css — New one-page portfolio
  - System: CSS variables with [data-theme]
  - Modes: dark (default) and light (toggle)
  - Layout: responsive, mobile-first
*/

:root {
  --bg: #0b0d10;
  --bg-elev: #11161a;
  --text: #e6ecf2;
  --muted: #9aa7b3;
  --accent: #4cc2ff;
  --card: #12181d;
  --border: #1f2a33;
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
  --radius: 14px;
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --text: #1a232b;
  --muted: #4a5561;
  --accent: #0ea5e9;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 24px rgba(2,6,23,0.08);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -20%, rgba(76,194,255,0.08), transparent),
              radial-gradient(1000px 600px at -10% 10%, rgba(99,102,241,0.08), transparent),
              var(--bg);
  line-height: 1.65;
}

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

.container { width: min(1120px, 92%); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--accent); color: #020617; border-radius: 9px; font-weight: 800; }
.brand-text { letter-spacing: 0.2px; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text); }
.nav-toggle .bar { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.nav ul { list-style: none; display: flex; gap: 18px; align-items: center; padding: 0; margin: 0; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; opacity: 0.9; }
.nav a:hover { opacity: 1; color: var(--accent); }

.theme-toggle { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 999px; padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 8px; }
.theme-toggle:hover { transform: translateY(-1px); }

/* Hero */
.hero { padding: 56px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.hero-copy h1 { font-size: clamp(28px, 4vw, 48px); margin: 10px 0 12px; }
.hero-copy .lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 62ch; }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.cta-row { display: flex; gap: 12px; margin-top: 18px; }
.btn { --btn-bg: var(--bg-elev); --btn-fg: var(--text); border: 1px solid var(--border); background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.btn.primary { --btn-bg: var(--accent); --btn-fg: #020617; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-weight: 600; }
.btn.full { width: 100%; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.start-project { max-width: calc(100% - 48px); }

.meta-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.meta-row .social { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-elev); }
.meta-row .social img { width: 20px; height: 20px; }

.hero-media { display: grid; place-items: center; }
.avatar { width: clamp(120px, 25vw, 220px); border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 96%, transparent), color-mix(in oklab, var(--bg) 90%, transparent)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(22px, 2.8vw, 34px); margin: 0 0 12px; }
.section .section-lead { color: var(--muted); margin: 4px 0 20px; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 24px; }

.highlight { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.bullets { margin: 0; padding-left: 18px; color: var(--muted); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.skill { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border: 1px solid var(--border); padding: 12px 14px; border-radius: 12px; transition: transform 0.9s ease; }
.skill:hover{ transform: scale(1.03); box-shadow: 0 10px 40px rgba(76,194,255,0.18), var(--shadow); }
.skill img { width: 28px; height: 28px; transition: filter 0.3s; }
.skill span { font-weight: 600; }

/* Invert icons for dark mode */
.invert-on-dark {
  filter: invert(1) hue-rotate(180deg) brightness(1.2) contrast(1.1);
}
:root[data-theme="light"] .invert-on-dark {
  filter: none;
}

/* GitHub icon dark mode fix */
.github-icon {
  filter: brightness(0) invert(1) grayscale(0.2) contrast(1.2);
  transition: filter 0.3s;
}
:root[data-theme="light"] .github-icon {
  filter: none;
}

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 10px; }
.cards.three { grid-template-columns: 1fr; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.9s cubic-bezier(.4,2,.3,1), box-shadow 0.3s cubic-bezier(.4,2,.3,1);
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(76,194,255,0.18), var(--shadow);
  z-index: 2;
}
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 10px; }

/* CTA band under Services */
.cta-band {
  margin-top: 36px;
  border-top: 1px dashed var(--border);
  padding-top: 28px;
}
.cta-band-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-elev) 92%, transparent), transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.btn.large { padding: 14px 22px; font-size: 1.02rem; }
.cta-band-content h3 { margin: 0; font-size: clamp(18px, 2.2vw, 22px); font-weight: 600; }

@media (max-width: 719px) {
  .cta-band-content { flex-direction: column; align-items: stretch; text-align: center; }
  .btn.large { width: 100%; }
}

/* Contact */
.contact-list { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.contact-form { display: grid; gap: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input, .contact-form textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid color-mix(in oklab, var(--accent) 55%, transparent); outline-offset: 2px; }
.form-note { color: var(--muted); margin: 6px 0 0; }

/* Contact status states */
#contact-status[data-type="info"] { color: var(--muted); }
#contact-status[data-type="success"] { color: #22c55e; }
#contact-status[data-type="error"] { color: #ef4444; }
.contact-form button[disabled] { opacity: 0.7; cursor: not-allowed; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0; margin-top: 40px; }
.footer-inner { display: flex; gap: 12px; justify-content: space-between; align-items: center; color: var(--muted); }
.footer-inner nav { display: inline-flex; gap: 12px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }

/* Responsive */
@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
  .two-col { grid-template-columns: 1.2fr 0.8fr; }
  .skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 719px) {
  .nav { position: fixed; inset: 56px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .2s ease; }
  .nav.open { transform: translateY(0); }
  .nav ul { flex-direction: column; align-items: stretch; padding: 10px; }
  .nav a { padding: 10px 12px; border-radius: 8px; }
}

/* Accessibility helpers */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Accent utility */
.accent { color: var(--accent); }
