/* ==========================================================================
   Karo | Web Developer Portfolio
   Fonts: Space Grotesk (headings) + Inter (body) — pure black theme with a
   single electric-blue accent.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

:root{
  --bg:            #05070c;
  --bg-panel:      #0a0d15;
  --bg-elevate:    #11151f;
  --bg-elevate-2:  #161b28;
  --border:        rgba(64, 156, 255, .12);
  --border-strong: rgba(64, 156, 255, .24);

  --text:          #eaf1fb;
  --text-dim:      #97a4bd;
  --text-faint:    #5c6680;

  --accent:        #0EA5FF;   /* electric blue */
  --accent-soft:   rgba(14, 165, 255, .14);
  --accent-2:      #35C7FF;   /* brighter electric blue */
  --accent-2-soft: rgba(53, 199, 255, .14);

  --on-accent:     #031018;   /* text color used on top of the accent fill */

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --rail-w: 84px;
  --panel-w: 240px;
  --gutter: clamp(20px, 5vw, 64px);
  --content-max: 1440px;

  --ease: cubic-bezier(.16,.8,.3,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name, .hero-stat b, .stat-num, .btn, .filter-chip, .eyebrow{
  font-family: "Space Grotesk", "Inter", sans-serif;
}

a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; }

::selection{ background: var(--accent); color: var(--on-accent); }

/* visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* subtle textured background — electric blue glow on black */
.texture{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(14,165,255,.10), transparent 60%),
    radial-gradient(900px 560px at 100% 10%, rgba(53,199,255,.08), transparent 55%);
}

.page{
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   Sidebar — a slim always-visible rail on the left, plus a panel that
   expands on click and pushes the main content over (never overlays it).
   ========================================================================== */
.sidebar{
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-right: 1px solid var(--border);
  z-index: 40;
}

/* the slim rail: always visible, holds the mark, vertical name and toggle */
.rail{
  width: var(--rail-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 0;
}
.brand-mark{
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(155deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: var(--on-accent);
  flex-shrink: 0;
}
.brand-vertical{
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.nav-toggle{
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.nav-toggle:hover{ color: var(--text); background: var(--bg-elevate); border-color: var(--accent); }
.sidebar.open .nav-toggle{ color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* the expandable panel: width animates from 0 -> var(--panel-w) */
.sidebar-panel{
  width: 0;
  overflow: hidden;
  background: var(--bg-panel);
  transition: width .35s var(--ease);
}
.sidebar.open .sidebar-panel{ width: var(--panel-w); }
.sidebar-panel-inner{
  width: var(--panel-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 34px 24px;
}

.side-nav{ display: flex; flex-direction: column; gap: 2px; }
.side-nav a{
  position: relative;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.side-nav a:hover{ color: var(--text); background: var(--bg-elevate); }
.side-nav a.active{ color: var(--text); background: var(--bg-elevate); }
.side-nav a.active::before{
  content: "";
  position: absolute;
  right: 0;
  top: 50%; translate: 0 -50%;
  width: 3px; height: 60%;
  border-radius: 2px;
  background: var(--accent);
}

.sidebar-footer{ margin-top: auto; }

.social-row{ display: flex; gap: 8px; margin-bottom: 22px; }
.social-row a{
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: all .2s var(--ease);
}
.social-row a:hover{ color: var(--on-accent); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social-row svg{ width: 16px; height: 16px; }

.sidebar-meta{ font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.sidebar-meta strong{ color: var(--text-dim); font-weight: 600; }

/* ==========================================================================
   Main content — resizes (never covered) when the panel opens
   ========================================================================== */
.content{
  flex: 1;
  margin-left: var(--rail-w);
  min-width: 0;
  transition: margin-left .35s var(--ease);
}
.sidebar.open ~ .content{
  margin-left: calc(var(--rail-w) + var(--panel-w));
}

section{
  padding: 90px var(--gutter);
  border-bottom: 1px solid var(--border);
}
section:last-of-type{ border-bottom: none; }

/* keep grids from stretching edge-to-edge on very wide / TV screens */
.hero-grid, .about-grid, .skills-cols, .services-grid,
.portfolio-grid, .stats-strip, .contact-grid, .site-footer, .section-head{
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .3px;
  margin-bottom: 14px;
}
.eyebrow::before{
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}

.section-head{ max-width: 640px; margin-bottom: 48px; margin-left: 0; }
.section-title{ font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 0 0 12px; }
.section-desc{ color: var(--text-dim); font-size: 15.5px; margin: 0; }

/* ---------- Hero ---------- */
.hero{
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.hero-badges{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.badge{
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-elevate);
  border: 1px solid var(--border-strong);
  padding: 7px 13px;
  border-radius: 999px;
}
.badge .dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }

.hero-title{
  font-size: clamp(32px, 5.4vw, 62px);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 18px;
}
.hero-title .accent-word{
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text{ color: var(--text-dim); font-size: 16.5px; max-width: 520px; margin: 0 0 30px; }

.cta-row{ display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn-primary{ background: var(--accent); color: var(--on-accent); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgba(14,165,255,.55); }
.btn-ghost{ background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover{ background: var(--bg-elevate); transform: translateY(-2px); }

.hero-stats-row{ display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stat b{ display: block; font-size: 22px; font-weight: 800; }
.hero-stat span{ font-size: 12.5px; color: var(--text-faint); }

.hero-portrait{
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
  aspect-ratio: 1;
}
.portrait-blob{
  position: absolute; inset: 0;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  background: linear-gradient(155deg, var(--bg-elevate-2), var(--bg-elevate));
  border: 1px solid var(--border-strong);
  animation: morph 12s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.portrait-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.05);
}

.portrait-blob .initials{
  font-size: 76px; font-weight: 900;
  color: var(--text-faint);
  opacity: .5;
}
.portrait-ring{
  position: absolute; inset: -14px;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  border: 1px dashed var(--border-strong);
  animation: spin 26s linear infinite;
}
.portrait-tag{
  position: absolute;
  bottom: 10px; inset-inline-start: -10px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.5);
}
.portrait-tag .dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }

@keyframes morph{
  0%, 100% { border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; }
  34%      { border-radius: 63% 37% 40% 60% / 55% 62% 38% 45%; }
  67%      { border-radius: 50% 50% 34% 66% / 60% 40% 60% 40%; }
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------- About ---------- */
.about-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 50px;
  align-items: start;
}
.about-text p{ color: var(--text-dim); font-size: 15.5px; margin: 0 0 16px; }
.fact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fact-card{
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.fact-card b{ display: block; font-size: 14.5px; margin-bottom: 4px; }
.fact-card span{ font-size: 13px; color: var(--text-faint); }

/* ---------- Skills ---------- */
.skills-cols{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.skill-group{
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.skill-group h3{ margin: 0 0 16px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.skill-group h3 .ico{
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chip-row{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-elevate);
  border: 1px solid var(--border-strong);
  padding: 7px 12px;
  border-radius: 999px;
}

/* ---------- Services ---------- */
.services-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card{
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.service-card:hover{ transform: translateY(-6px); border-color: var(--accent); background: var(--bg-elevate); }
.service-ico{
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-2-soft); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.service-card h3{ font-size: 16px; margin: 0 0 8px; }
.service-card p{ font-size: 13.5px; color: var(--text-dim); margin: 0; }

/* ---------- Portfolio ---------- */
.portfolio-filter{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-chip{
  font-size: 13px; font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter-chip.active, .filter-chip:hover{ background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.project-card{
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.project-card:hover{ transform: translateY(-5px); border-color: var(--border-strong); }
.project-thumb{
  height: 150px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.project-thumb::after{ content: ""; position:absolute; inset:0; opacity:.55; }
.thumb-a{ background: linear-gradient(135deg, #0d1f2e, #0a0d15); }
.thumb-b{ background: linear-gradient(135deg, #0c2230, #0a0d15); }
.thumb-c{ background: linear-gradient(135deg, #0a1c2e, #0a0d15); }
.thumb-d{ background: linear-gradient(135deg, #0b1f30, #0a0d15); }
.project-body{ padding: 20px 22px 24px; }
.project-tag{ font-size: 11.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }
.project-body h3{ font-size: 16.5px; margin: 8px 0 8px; }
.project-body p{ font-size: 13.5px; color: var(--text-dim); margin: 0 0 14px; }
.project-stack{ display: flex; flex-wrap: wrap; gap: 6px; }
.project-stack span{ font-size: 11px; font-weight: 600; color: var(--text-faint); background: var(--bg-elevate); padding: 4px 9px; border-radius: 6px; }

.aydamakeup{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
}

/* ---------- Stats ---------- */
.stats-strip{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card{
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 16px;
}
.stat-num{ font-size: 34px; font-weight: 900; color: var(--accent); display: block; }
.stat-num sup{ font-size: 18px; }
.stat-label{ font-size: 13px; color: var(--text-dim); margin-top: 6px; }

/* ---------- Testimonial ---------- */
.testimonial-box{
  position: relative;
  background: linear-gradient(155deg, var(--bg-elevate-2), var(--bg-panel));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 46px;
  max-width: 760px;
}
.quote-mark{ font-size: 60px; font-family: Georgia, serif; color: var(--accent); line-height: 0; display: block; margin-bottom: 10px; }
.testimonial-box p{ font-size: 18px; line-height: 1.85; margin: 0 0 22px; }
.testimonial-author{ display: flex; align-items: center; gap: 12px; }
.author-avatar{
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.author-name{ font-weight: 700; font-size: 14.5px; }
.author-role{ font-size: 12.5px; color: var(--text-faint); }

/* ---------- Contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
}
.contact-card{
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}
.contact-row{ display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.contact-row:last-child{ margin-bottom: 0; }
.contact-ico{
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-2-soft); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-row b{ display: block; font-size: 14px; margin-bottom: 2px; }
.contact-row span{ font-size: 13px; color: var(--text-faint); }

.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field{ display: flex; flex-direction: column; gap: 8px; }
.field.full{ grid-column: 1 / -1; }
.field label{ font-size: 13px; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea{
  background: var(--bg-elevate);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus{ border-color: var(--accent); }
.form-note{ font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer{
  padding: 30px var(--gutter) 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Scroll reveal effect ---------- */
.reveal{ opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive — TV, desktop, laptop, tablet, phone
   ========================================================================== */

/* ----- Large desktop monitors / TVs (>=1600px) -----
   Keep line lengths and card widths from stretching too wide, and give the
   page a bit more breathing room and slightly larger type for viewing
   from a distance. */
@media (min-width: 1600px){
  :root{
    --gutter: clamp(64px, 6vw, 140px);
    --content-max: 1560px;
  }
  body{ font-size: 17px; }
  .hero-title{ font-size: clamp(56px, 4.2vw, 92px); }
  .section-title{ font-size: clamp(28px, 2.4vw, 40px); }
}

/* ----- Small laptops / large tablets landscape ----- */
@media (max-width: 1240px){
  :root{ --content-max: 100%; }
}

@media (max-width: 1080px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-strip{ grid-template-columns: repeat(2, 1fr); }
}

/* ----- Tablets (portrait & smaller landscape) ----- */
@media (max-width: 960px){
  :root{ --panel-w: 220px; }
  .hero-grid, .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .hero-portrait{ order: -1; width: min(70%, 260px); margin: 0 auto; }
  .portfolio-grid{ grid-template-columns: 1fr; }
  .hero{ min-height: auto; padding-top: 110px; }
}

/* ----- Phones (landscape & large portrait) ----- */
@media (max-width: 760px){
  :root{ --rail-w: 64px; --panel-w: 210px; }

  section{ padding: 64px 18px; }
  .hero{ padding-top: 90px; }
  .hero-title{ font-size: clamp(30px, 8vw, 44px); }
  .skills-cols{ grid-template-columns: 1fr; }
  .services-grid{ grid-template-columns: 1fr; }
  .form-grid{ grid-template-columns: 1fr; }
  .hero-stats-row{ gap: 22px; flex-wrap: wrap; }
  .stats-strip{ grid-template-columns: repeat(2, 1fr); }
  .testimonial-box{ padding: 34px 26px; }
  .site-footer{ text-align: center; justify-content: center; padding: 26px 18px 34px; }
}

/* ----- Small phones ----- */
@media (max-width: 480px){
  :root{ --rail-w: 56px; --panel-w: 230px; }

  section{ padding: 52px 16px; }
  .hero-badges{ gap: 8px; }
  .badge{ font-size: 11.5px; padding: 6px 11px; }
  .cta-row .btn{ flex: 1 1 auto; justify-content: center; }
  .stats-strip{ grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card{ padding: 22px 12px; }
  .stat-num{ font-size: 28px; }
  .testimonial-box{ padding: 26px 20px; }
  .quote-mark{ font-size: 46px; }
  .contact-card{ padding: 22px; }
}
