/*
  Modern Portfolio Styles
  - Vanilla CSS, no build step
  - Light/Dark via [data-theme="dark"] on <html>
  - Utility-like tokens + components
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --text: #0b1220;
  --muted: #5b6470;
  --primary: #0ea5e9; /* sky-500 */
  --primary-600: #0284c7;
  --ring: rgba(14, 165, 233, 0.3);
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 8, 20, 0.08);
  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --text: #eef2ff;
  --muted: #a3adbc;
  --primary: #38bdf8; /* sky-400 */
  --primary-600: #0ea5e9;
  --ring: rgba(56, 189, 248, 0.35);
  --card: #0f172a;
  --border: #1f2937;
  --shadow: 0 12px 32px rgba(2, 8, 20, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* Navigation */
.nav {
  position: sticky;
  top: 0; inset-inline: 0;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 50;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; letter-spacing: 0.5px; color: var(--text); text-decoration: none; font-size: 1.25rem; }
.nav__links { display: none; gap: 24px; }
.nav__links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; gap: 10px; align-items: center; }
.nav__hamburger { display: inline-flex; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__hamburger { display: none; }
}

/* Buttons */
.btn { 
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 600;
  box-shadow: var(--shadow); transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--border), var(--primary) 30%); }
.btn:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn--primary { background: var(--primary); color: white; border-color: transparent; }
.btn--primary:hover { background: var(--primary-600); }
.btn--ghost { background: transparent; }
.btn--icon { padding: 10px; width: 42px; height: 42px; justify-content: center; }
.btn--lang { width: auto; padding: 10px 12px; gap: 6px; }
.btn--lang i { margin-right: 2px; }

/* Sections */
.section { padding: 88px 0; background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section__header { text-align: center; margin-bottom: 36px; }
.title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0 0 10px; }
.lede { color: var(--muted); max-width: 720px; margin: 0 auto; }

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 900px){
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero__inner { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.hero__content { text-align: center; }
.hero__visual { display: none; }
.headline { font-size: clamp(2.25rem, 6vw, 4rem); margin: 0 0 12px; font-weight: 800; }
.subhead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); margin: 0 0 22px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 10px; }
.hero__socials { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }

@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.2fr 1fr; }
  .hero__content { text-align: left; }
  .hero__cta { justify-content: flex-start; }
  .hero__socials { justify-content: flex-start; }
  .hero__visual { display: block; }
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card--glass { height: 320px; display: grid; place-items: center; position: relative; overflow: hidden; }
.card--glass::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(600px 200px at var(--x,50%) var(--y,50%), color-mix(in oklab, var(--primary) 25%, transparent), transparent 60%); filter: blur(30px); opacity: .7; }
.logo { font-size: 80px; font-weight: 800; letter-spacing: 1px; color: color-mix(in oklab, var(--text) 85%, var(--primary)); }

/* Feature list */
.feature-list { display: grid; gap: 16px; }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.feature i { width: 24px; height: 24px; color: var(--primary); }
.feature h4 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Project cards */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px){ .cards { grid-template-columns: 1fr 1fr; } }
.card--project { overflow: hidden; }
.card__media { aspect-ratio: 16 / 9; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card--project:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 18px; }
.card__actions { display: flex; gap: 10px; margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--card); }

/* Education grid centering (2 items) */
.edu-grid { grid-template-columns: 1fr; justify-items: center; justify-content: center; }
.edu-grid > .card { width: 100%; max-width: 360px; }
@media (min-width: 720px){
  .edu-grid { grid-template-columns: repeat(2, minmax(280px, 360px)); justify-content: center; }
}

/* Skills */
.skillcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.meter { margin: 12px 0 16px; }
.meter__head { display: flex; justify-content: space-between; font-weight: 600; }
.meter__value { color: var(--primary); }
.meter__bar { height: 10px; background: color-mix(in oklab, var(--border), var(--bg) 30%); border-radius: 999px; overflow: hidden; }
.meter__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-600)); border-radius: 999px; transition: width 1s ease; }

/* Skill rows with blue dot indicators */
.skillgrid { display: grid; gap: 8px; }
.skill-row { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 8px 10px; background: color-mix(in oklab, var(--bg), var(--text) 3%); border: 1px solid var(--border); border-radius: 8px; }
.skill-row .name { font-weight: 600; color: var(--text); }
.dots { display: inline-grid; grid-auto-flow: column; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 3px; background: #e5e7eb; }
html[data-theme="dark"] .dot { background: #334155; }
.dot--filled { background: #4289db; }
html[data-theme="dark"] .dot--filled { background: #38bdf8; }

/* Skill chips (oval pills) */
.skillchips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { 
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: transform .15s ease, filter .2s ease;
}
.chip:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Light mode shades */
.chip--strong { background: #1d4ed8; color: #fff; }
.chip--medium { background: #3b82f6; color: #fff; }
.chip--light { background: #93c5fd; color: #0b1220; }

/* Dark mode adjustments */
html[data-theme="dark"] .chip--strong { background: #1e40af; color: #e5e7eb; }
html[data-theme="dark"] .chip--medium { background: #2563eb; color: #e5e7eb; }
html[data-theme="dark"] .chip--light { background: #60a5fa; color: #0b1220; }

/* Form */
.form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; margin-bottom: 14px; }
label { font-weight: 600; }
input, textarea { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); border-color: transparent; }
.hp { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert--success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.alert--error { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.to-top { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); background: var(--card); box-shadow: var(--shadow); }

/* Fancy bits */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__blobs .blob { position: absolute; inset: auto; filter: blur(30px); opacity: .35; }
.blob--a { left: 10%; top: 10%; width: 320px; height: 320px; border-radius: 999px; background: radial-gradient(200px at 30% 30%, #60a5fa, transparent 70%); }
.blob--b { right: 5%; bottom: 10%; width: 420px; height: 420px; border-radius: 999px; background: radial-gradient(220px at 60% 60%, #a78bfa, transparent 75%); }

/* Experience cards */
.exp-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px){ .exp-cards { grid-template-columns: 1fr 1fr; } }
.exp-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.exp-hero { aspect-ratio: 16 / 9; position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .5px; }
.exp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--exp-a, #60a5fa) 0%, var(--exp-b, #a78bfa) 100%); }
.exp-hero__label { position: relative; z-index: 1; font-size: clamp(18px, 3vw, 28px); text-shadow: 0 6px 24px rgba(0,0,0,.25); }
.exp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.exp-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px; cursor: pointer; }
.exp-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; }
.exp-meta { display: flex; flex-direction: column; gap: 4px; }
.exp-title { font-weight: 800; color: var(--text); }
.exp-sub { color: var(--muted); font-weight: 600; font-size: .95rem; }
.exp-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 6px 8px; border-radius: 999px; background: color-mix(in oklab, var(--primary) 12%, var(--bg)); color: color-mix(in oklab, var(--text) 70%, var(--primary)); border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border)); }
.exp-toggle { color: var(--muted); transition: transform .2s ease; }
.exp-card.open .exp-toggle { transform: rotate(180deg); }
.exp-details { border-top: 1px solid var(--border); padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.exp-card.open .exp-details { padding: 16px; }
.exp-list { margin: 0; padding-left: 18px; }
.exp-list li { margin: 6px 0; }

/* Mobile nav panel */
.mobile-panel { display: none; position: fixed; inset: 64px 0 0 0; background: var(--bg); border-top: 1px solid var(--border); padding: 16px 20px; }
.mobile-panel.open { display: block; }
.mobile-panel a { display: block; padding: 12px 6px; color: var(--muted); text-decoration: none; font-weight: 600; }
.mobile-panel a:hover { color: var(--text); }
