/* Mehar's website — shared styles
   v2: vibrant dashboard skin, dark base, tile-grid homepage. */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #14151F;
  --bg-card: #1E2036;
  --bg-card-hover: #262A47;
  --bg-raised: #24263D;
  --ink: #F4F5FA;
  --ink-soft: #9EA2BE;
  --ink-faint: #6C7093;
  --line: rgba(244,245,250,0.08);

  --study: #4EE1D6;
  --spotify: #1ED760;
  --youtube: #FF4D5E;
  --roblox: #FF8A3D;
  --diary: #C08CFF;

  --radius: 18px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(78,225,214,0.10), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(192,140,255,0.10), transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, .display {
  font-family: 'Fredoka', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.4em;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- nav ---- */
header.site {
  padding: 26px 0 10px;
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  color: var(--ink);
}
.logo span { color: var(--study); }
nav.links { display: flex; gap: 10px; flex-wrap: wrap; }
nav.links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
nav.links a:hover { color: var(--ink); background: var(--bg-card-hover); border-color: rgba(244,245,250,0.16); }

/* ---- dashboard hero / greeting ---- */
.hero {
  padding: 56px 0 8px;
}
.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.18;
}
.hero h1 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(14deg); }
  60% { transform: rotate(0deg); }
}
.hero p.sub {
  max-width: 480px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---- tile dashboard ---- */
.dash-group {
  padding: 30px 0 6px;
}
.dash-group .group-label {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 820px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; }
}
.tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tile-color, var(--study));
  opacity: 0;
  transition: opacity 0.16s ease;
}
.tile:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: color-mix(in srgb, var(--tile-color, var(--study)) 55%, transparent);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35), 0 0 0 1px color-mix(in srgb, var(--tile-color, var(--study)) 30%, transparent);
}
.tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: color-mix(in srgb, var(--tile-color, var(--study)) 22%, transparent);
}
.tile h3 {
  font-size: 17px;
  margin: 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
}
.tile p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.tile .dot {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tile-color, var(--study));
  box-shadow: 0 0 10px var(--tile-color, var(--study));
}

/* ---- generic page shell (study/breakzone/diary placeholders) ---- */
main.page {
  padding: 60px 0 90px;
  text-align: center;
}
main.page h1 { font-size: clamp(28px, 4vw, 38px); }
main.page p.note {
  max-width: 480px;
  margin: 14px auto 0;
  color: var(--ink-soft);
}
.badge-coming {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--study);
}
.back-link {
  display: inline-block;
  margin-top: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.back-link:hover { color: var(--ink); background: var(--bg-card); }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  margin-top: 40px;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ============================================================
   v3: anime-style two-door portal (mix of shonen-bold + kawaii)
   ============================================================ */
:root {
  --study-a: #3B82F6;
  --study-b: #7C3AED;
  --study-glow: #60E8DE;
  --break-a: #FF2D78;
  --break-b: #FF6B35;
  --break-c: #FFD23F;
  --break-glow: #FFD23F;

  --eng: #3B82F6;
  --hin: #7C3AED;
  --math: #2DD4BF;
  --sci: #22D3EE;
  --sst: #818CF8;
}

/* floating sakura petals */
.petal-field { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.petal { position: absolute; top: -30px; opacity: .6; animation-name: petal-fall; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes petal-fall {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); }
  50%  { transform: translateY(50vh) translateX(30px) rotate(170deg); }
  100% { transform: translateY(112vh) translateX(-20px) rotate(340deg); }
}

/* portal hero */
.portal-hero { padding: 50px 0 6px; text-align: center; position: relative; z-index: 1; }
.portal-hero .eyebrow {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; margin-bottom: 10px;
}
.portal-hero h1 { font-size: clamp(30px, 4.8vw, 48px); line-height: 1.15; }
.portal-hero h1 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
.portal-hero p.sub { max-width: 440px; margin: 10px auto 0; color: var(--ink-soft); font-size: 16px; }

/* two doors */
.door-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  padding: 34px 0 76px; position: relative; z-index: 1;
}
@media (max-width: 760px) { .door-grid { grid-template-columns: 1fr; } }

.door {
  position: relative; border-radius: 28px; overflow: hidden;
  min-height: 440px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 26px 22px 32px; text-decoration: none; color: #fff;
  isolation: isolate; border: 2px solid rgba(255,255,255,0.14);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.door.study {
  background:
    radial-gradient(circle at 30% 15%, var(--study-b), transparent 55%),
    radial-gradient(circle at 80% 85%, var(--study-glow), transparent 45%),
    linear-gradient(165deg, var(--study-a), #14151F 78%);
}
.door.breakd {
  background:
    radial-gradient(circle at 70% 15%, var(--break-a), transparent 55%),
    radial-gradient(circle at 20% 85%, var(--break-c), transparent 45%),
    linear-gradient(200deg, var(--break-b), #14151F 78%);
}
.door:hover { transform: translateY(-6px) scale(1.015); }
.door.study:hover { box-shadow: 0 20px 50px rgba(59,130,246,0.4), 0 0 0 1px var(--study-glow); }
.door.breakd:hover { box-shadow: 0 20px 50px rgba(255,45,120,0.4), 0 0 0 1px var(--break-glow); }

.door .arch { position: absolute; inset: 0; z-index: 0; opacity: .5; width: 100%; height: 100%; }
.door .speedlines { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0.25s ease; }
.door:hover .speedlines { opacity: .55; }

.door .sparkle { position: absolute; z-index: 1; animation: sparkle-pulse 2.2s ease-in-out infinite; }
@keyframes sparkle-pulse {
  0%, 100% { opacity: .25; transform: scale(0.75) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.15) rotate(15deg); }
}

.door .mascot {
  position: relative; z-index: 2; width: 160px; height: auto; margin-bottom: 4px;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.35));
  transition: transform 0.28s ease;
}
.door:hover .mascot { transform: translateY(-8px) scale(1.05) rotate(-2deg); }

.door .label {
  position: relative; z-index: 2; font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: 25px; letter-spacing: .5px; margin: 8px 0 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.door .door-sub {
  position: relative; z-index: 2; font-size: 13.5px; color: rgba(255,255,255,0.88);
  margin: 0 0 16px; text-align: center; max-width: 230px;
}
.door .enter-btn {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.42);
  padding: 9px 22px; border-radius: 100px; font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}
.door:hover .enter-btn { background: rgba(255,255,255,0.3); }

/* themed page banners (study/break subpages) */
.page-banner { padding: 54px 0 30px; text-align: center; position: relative; overflow: hidden; z-index: 1; }
.page-banner.study-banner {
  background: radial-gradient(circle at 20% 0%, rgba(124,58,237,0.28), transparent 60%),
              radial-gradient(circle at 85% 10%, rgba(59,130,246,0.22), transparent 55%);
}
.page-banner.break-banner {
  background: radial-gradient(circle at 80% 0%, rgba(255,45,120,0.26), transparent 60%),
              radial-gradient(circle at 15% 10%, rgba(255,210,63,0.2), transparent 55%);
}
.page-banner .eyebrow { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: 8px; }
.page-banner h1 { font-size: clamp(28px, 4.5vw, 42px); }
.page-banner p { color: var(--ink-soft); max-width: 440px; margin: 10px auto 0; }

.subpage-shell { text-align: center; padding: 60px 0 90px; position: relative; z-index: 1; }
.subpage-shell h1 { font-size: clamp(26px, 4vw, 36px); }
.subpage-shell .badge-coming { margin-top: 18px; }
