/* aes.css — Personal website stylesheet
  Mobile-first, responsive, accessible, and theme-aware
*/

/* =========================
  Theme variables & scales
  ========================= */
:root{
  /* Colors */
  --bg:  #0f1724; /* deep slate */
  --surface: #0b1220;
  --muted: #94a3b8;
  --text: #e6eef8;
  --accent: #38bdf8; /* sky-400 */
  --accent-2: #7c3aed; /* violet */
  --success: #10b981;
  --danger:  #ef4444;

  /* UI */
  --radius: 12px;
  --radius-sm: 8px;
  --container-max: 1100px;
  --gap: 1.25rem;
  --padding: 1rem;
  --shadow-1: 0 6px 18px rgba(2,6,23,0.5);
  --glass: rgba(255,255,255,0.02);
  --nav-glass: rgba(2,6,23,0.8);

  /* Typography */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
  --fs-base: 16px;
  --lead: 1.6;
  --weight-regular: 400;
  --weight-medium: 600;
  --weight-bold: 700;
}

/* Respect user's preference for reduced motion */
@media (prefers-reduced-motion: reduce){
  :root{ --transition: none; }
}
:root{ --transition: 200ms cubic-bezier(.2,.8,.2,1); }

/* Dark/light theme toggle via [data-theme="light"] on html or body */
@media (prefers-color-scheme: light){
  :root{
   --bg: #f7fbff;
   --surface: #ffffff;
   --muted: #506278;
   --text: #071428;
   --accent: #0ea5e9;
   --accent-2: #6d28d9;
  --shadow-1: 0 8px 30px rgba(11,14,22,0.06);
  --glass: rgba(15,23,36,0.02);
  --nav-glass: rgba(15,23,36,0.06);
  }
}

/* =========================
  Reset / Base
  ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html{
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  height: 100%;
}

body{
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--lead);
  background: none;
  -webkit-font-smoothing: antialiased;
}

/* Prefer a solid root background color instead of gradient */

/* Links and images */
a{ color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus{ color: color-mix(in srgb, var(--accent) 80%, var(--accent-2) 20%); outline: none; }
img, svg{ max-width: 100%; display: block; height: auto; }

/* =========================
  Layout helpers
  ========================= */
.container{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Grid system */
.row{ display: grid; gap: var(--gap); }
.row-cols-2{ grid-template-columns: 1fr 1fr; }
.row-cols-3{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px){
  .row-cols-2, .row-cols-3{ grid-template-columns: 1fr; }
}

/* Utilities */
.flex{ display:flex; }
.items-center{ align-items:center; }
.justify-between{ justify-content: space-between; }
.center{ display:flex; align-items:center; justify-content:center; }
.mt-0{ margin-top:0; }
.mb-0{ margin-bottom:0; }

/* Visually-hidden for screen readers */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================
  Header / Navbar
  ========================= */
.header{
  position: sticky;
  top: 12px;
  z-index: 60;
  width: calc(100% - 2rem);
  margin: 0 auto;
  backdrop-filter: blur(8px);
  padding: 0.5rem;
  border-radius: calc(var(--radius) + 4px);
}

.nav{
  display:flex;
  gap: 0.75rem;
  align-items:center;
  justify-content: space-between;
  background: var(--nav-glass);
  padding: 0.45rem 0.75rem;
  box-shadow: var(--shadow-1);
  border-radius: var(--radius-sm);
  position: relative; /* allow absolutely-positioned mobile panel */
}

.brand{
  display:flex;
  gap: 0.75rem;
  align-items:center;
}
.brand .logo{
  width: 44px; height:44px;
  border-radius: 10px;
  background: var(--accent);
  display:inline-grid; place-items:center;
  color: white; font-weight: var(--weight-bold);
  box-shadow: 0 6px 18px rgba(7,10,25,0.45);
}

/* Primary nav links */
.nav-links{ display:flex; gap: 0.5rem; align-items:center; }
.nav-links a{
  color: var(--muted);
  font-weight: var(--weight-medium);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
.nav-links a:hover, .nav-links a:focus{
  color: var(--text);
  background: rgba(255,255,255,0.02);
}

/* Mobile hamburger */
.hamburger{
  display:none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.25rem;
}

/* =========================
  Hero
  ========================= */
.hero{
  padding: clamp(2rem, 6vw, 5rem) 0;
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
}

.hero-left h1{
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: var(--weight-bold);
  color: var(--text);
}
.hero-left p{
  margin: 0 0 1rem 0;
  color: var(--muted);
  max-width: 66ch;
}

/* CTA buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-weight: var(--weight-medium);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  background: transparent;
  color: inherit;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px rgba(56,189,248,0.12);
}
.btn-outline{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}
.btn-ghost{
  background: none;
  color: var(--muted);
}

/* Hero profile card */
.profile-card{
  background: var(--glass);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  display:flex; flex-direction:column; gap: 0.75rem;
}
.profile-card .avatar{
  width: 100%;
  height: 260px;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: var(--glass);
  display:flex; align-items:center; justify-content:center;
  color: rgba(255,255,255,0.85);
  font-weight: var(--weight-bold);
  font-size: 1.05rem;
}

/* =========================
  Sections
  ========================= */
.section{
  padding: clamp(1.25rem, 3vw, 2.5rem) 0;
  scroll-margin-top: 80px;
}
.section-title{
  display:flex;
  align-items:center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.section-title h2{
  margin:0;
  font-size: 1.125rem;
  font-weight: var(--weight-bold);
}
.section-title p{ margin:0; color:var(--muted); font-size:0.95rem; }

/* Cards */
.card{
  background: rgba(255,255,255,0.01);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(255,255,255,0.02);
}

/* Project grid */
.projects-grid{
  display:grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Project card */
.project-card{
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255,255,255,0.01);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255,255,255,0.03);
}
.project-card:hover{ transform: translateY(-6px); box-shadow: 0 12px 40px rgba(2,6,23,0.5); }

.project-card .thumbnail{ height: 140px; background: var(--accent); display:block; }
.project-card .meta{
  padding: 0.85rem;
  display:flex;
  flex-direction:column;
  gap: 0.4rem;
}
.project-card .title{ font-weight: var(--weight-medium); color: var(--text); font-size: 0.98rem; }
.project-card .desc{ color: var(--muted); font-size: 0.9rem; }

/* Skill list */
.skill-list{
  display:flex;
  gap: 0.5rem;
  flex-wrap:wrap;
}
.skill{
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-weight: var(--weight-medium);
  font-size: 0.85rem;
}

/* =========================
  Contact form
  ========================= */
.form{
  display:flex;
  flex-direction:column;
  gap: 0.75rem;
}
.input, textarea{
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  resize: vertical;
  min-height: 44px;
}
.input:focus, textarea:focus{
  outline: none;
  box-shadow: 0 6px 24px rgba(14,165,233,0.12);
  border-color: color-mix(in srgb, var(--accent) 70%, var(--accent-2) 30%);
}

.form-row{ display:grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; }
@media (max-width: 680px){ .form-row{ grid-template-columns: 1fr; } }

/* =========================
  Footer
  ========================= */
.footer{
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer .links{ display:flex; gap: 0.5rem; flex-wrap:wrap; }

/* =========================
  Accessibility: keyboard focus
  ========================= */
:focus{ outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, #fff 10%);
  outline-offset: 2px;
  border-radius: 8px;
}

/* =========================
  Small helpers & states
  ========================= */
.kicker{
  display:inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
}

.badge{
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.78rem;
}

/* Image frames / avatars */
.avatar-sm{ width:40px; height:40px; border-radius: 10px; overflow:hidden; display:inline-block; }
.avatar-md{ width:64px; height:64px; border-radius: 12px; overflow:hidden; display:inline-block; }

/* Responsive tweaks */
@media (max-width: 760px){
  /* Turn nav links into a vertical dropdown panel */
  .nav-links{
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none; /* hidden by default */
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    margin: 0;
    background: var(--nav-glass);
    border-radius: calc(var(--radius-sm) + 2px);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(10px);
    animation: dropdown-enter var(--transition);
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ width:100%; padding: 0.55rem 0.65rem; }
  .hamburger{ display:inline-flex; }
  .header{ left: 0; right: 0; width: calc(100% - 1rem); }
}

@keyframes dropdown-enter{
  from{ opacity:0; transform: translateY(-6px); }
  to{ opacity:1; transform: translateY(0); }
}

/* =========================
  Print friendly
  ========================= */
@media print{
  :root{ color-scheme: light; background: white; }
  .header, .footer, .btn, .nav{ display:none !important; }
  body{ color: #000; background: #fff; }
  .container{ width: 100%; padding: 0; }
}

/* =========================
  Optional utility classes
  ========================= */
.text-muted{ color: var(--muted) !important; }
.text-accent{ color: var(--accent) !important; }
.bg-surface{ background: var(--surface); }
.rounded{ border-radius: var(--radius); }

/* =========================
  End of file
  ========================= */