/* Shijith Pulikkal · Portfolio — Xtract Studio colours, Inter type */
:root {
  --yellow: #FFF200;
  --gold: #FFDE16;
  --dolphin: #169ED2;
  --teal: #00506B;
  --aqua: #68CBDB;
  --ocean: #137EA8;
  --midnight: #002B3D;
  --charcoal: #272725;
  --white: #FFFFFF;
  --ink: #E8F4F7;
  --muted: #9FC3CE;
  --line: rgba(104, 203, 219, .18);
  --card: rgba(255, 255, 255, .04);
  --radius: 18px;
  --max: 1240px;
  --pad: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--midnight);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.tagline {
  font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--aqua);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0, 43, 61, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-weight: 800; letter-spacing: -.01em; font-size: 17px; white-space: nowrap; }
.brand span { color: var(--yellow); }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav ul a {
  display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--white); background: rgba(104, 203, 219, .12); }
.nav ul a.cta { background: var(--yellow); color: var(--midnight); font-weight: 700; }
.nav ul a.cta:hover { background: var(--gold); color: var(--midnight); }
@media (max-width: 640px) {
  .nav ul a { padding: 8px 10px; font-size: 13px; }
  .nav ul li.hide-sm { display: none; }
  .brand { font-size: 15px; }
}
@media (max-width: 420px) {
  .nav ul li.hide-xs { display: none; }
}

/* ---------- Hero (front page) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 62%, rgba(22, 158, 210, .38), transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 30%, rgba(19, 126, 168, .25), transparent 70%),
    var(--midnight);
  padding: clamp(36px, 6vw, 64px) 0 clamp(48px, 7vw, 90px);
}
.hero::before { /* faint watermark word, like the reference */
  content: "Portfolio"; position: absolute; left: 50%; top: 32%; transform: translateX(-50%);
  font-size: clamp(120px, 26vw, 380px); font-weight: 900; letter-spacing: -.05em; white-space: nowrap;
  color: rgba(255, 255, 255, .025); pointer-events: none;
}
.hero-top { display: flex; align-items: center; gap: 18px; position: relative; }
.hero-top .logo { width: 120px; flex: none; }
.hero-top .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--aqua), rgba(104, 203, 219, .1)); position: relative; }
.hero-top .rule::before { content: ""; position: absolute; left: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
/* Desktop: a 2px line that fades to 5% */
@media (min-width: 641px) {
  .hero-top .rule { height: 2px; min-height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--aqua), rgba(104, 203, 219, .05)); }
  .hero-top .rule::before { top: -3.5px; }
}
.side-url {
  position: absolute; left: calc(var(--pad) - 4px); top: 210px; writing-mode: vertical-rl;
  font-size: 11px; letter-spacing: .4em; color: var(--muted); text-transform: lowercase;
}
@media (max-width: 900px) { .side-url { display: none; } }

.hero h1 {
  margin: clamp(10px, 2vw, 20px) 0 0; text-align: center; line-height: .9;
  font-size: clamp(64px, 13vw, 168px); font-weight: 300; letter-spacing: -.045em; color: var(--white);
}
.hero h1 em {
  font-style: italic; font-weight: 900; letter-spacing: -.05em;
  background: linear-gradient(90deg, var(--dolphin), var(--aqua));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
.hero .intro { text-align: center; max-width: 620px; margin: 18px auto 0; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); }
.hero .intro strong { color: var(--white); font-weight: 600; }
.badge-note {
  display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px;
}
.badge-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }

/* fanned cards */
.fan {
  position: relative; height: clamp(250px, 34vw, 420px); margin: clamp(26px, 4vw, 48px) auto 0; max-width: 1100px;
}
.fan a {
  position: absolute; bottom: 0; width: clamp(130px, 19vw, 230px); aspect-ratio: 3 / 4;
  border-radius: 20px; overflow: hidden; background: var(--teal);
  border: 3px solid rgba(255, 255, 255, .92);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
  transform-origin: 50% 100%;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
}
.fan a img { width: 100%; height: 100%; object-fit: cover; }
.fan a span {
  position: absolute; left: 0; right: 0; top: 0; padding: 14px 14px 34px; font-size: 14px; font-weight: 800; line-height: 1.25;
  background: linear-gradient(rgba(0, 43, 61, .95), rgba(0, 43, 61, .75) 60%, transparent); color: var(--white);
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s;
}
.fan a:hover, .fan a:focus-visible { z-index: 10 !important; box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 0 3px var(--yellow); }
.fan a:hover span, .fan a:focus-visible span { opacity: 1; transform: none; }
.fan a:nth-child(1) { left: 2%;  transform: rotate(-12deg) translateY(10%); z-index: 1; }
.fan a:nth-child(2) { left: 17%; transform: rotate(-7deg) translateY(-6%); z-index: 2; }
.fan a:nth-child(3) { left: 33%; transform: rotate(-2deg) translateY(2%); z-index: 3; }
.fan a:nth-child(4) { left: 48%; transform: rotate(3deg) translateY(6%); z-index: 4; }
.fan a:nth-child(5) { left: 63%; transform: rotate(-3deg) translateY(-8%); z-index: 3; }
.fan a:nth-child(6) { left: 78%; transform: rotate(8deg) translateY(4%); z-index: 2; }
.fan a:nth-child(1):hover { transform: rotate(-12deg) translateY(2%) scale(1.05); }
.fan a:nth-child(2):hover { transform: rotate(-7deg) translateY(-14%) scale(1.05); }
.fan a:nth-child(3):hover { transform: rotate(-2deg) translateY(-6%) scale(1.05); }
.fan a:nth-child(4):hover { transform: rotate(3deg) translateY(-2%) scale(1.05); }
.fan a:nth-child(5):hover { transform: rotate(-3deg) translateY(-16%) scale(1.05); }
.fan a:nth-child(6):hover { transform: rotate(8deg) translateY(-4%) scale(1.05); }
.swipe-hint { display: none; }
/* touch screens have no hover: always show the card titles */
@media (hover: none) {
  .fan a span { opacity: 1; transform: none; }
}
/* phones: swipeable row instead of the fan */
@media (max-width: 640px) {
  .fan {
    height: auto; display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
    margin: 30px calc(-1 * var(--pad)) 0; padding: 6px var(--pad) 22px;
    scrollbar-width: none;
  }
  .fan::-webkit-scrollbar { display: none; }
  .fan a {
    position: relative; left: auto !important; bottom: auto; transform: none !important;
    flex: 0 0 62vw; max-width: 260px; width: auto; border-width: 2px; border-radius: 16px;
    scroll-snap-align: start; box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
  }
  .fan a:hover, .fan a:focus-visible { box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 3px var(--yellow); }
  .fan a span { opacity: 1; transform: none; font-size: 15px; padding: 14px 14px 36px; }
  .swipe-hint {
    display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0;
    font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  }
  .swipe-hint svg { width: 16px; height: 16px; color: var(--yellow); }
  .hero-actions { margin-top: 26px; }
  .hero-top .logo { width: 120px; }
  .hero .intro { margin-top: 14px; }
  .badge-note .tagline { font-size: 10.5px; letter-spacing: .22em; text-align: center; }
}

.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: clamp(34px, 5vw, 56px); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; transition: transform .2s, background .2s, border-color .2s;
  border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--midnight); }
.btn-primary:hover { background: var(--gold); }
.btn-ghost { border-color: rgba(104, 203, 219, .45); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--aqua); background: rgba(104, 203, 219, .1); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
section.block { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(30px, 4.4vw, 48px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; color: var(--white); }
.section-head p { margin: 0; color: var(--muted); max-width: 440px; }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
@media (max-width: 380px) { .cat-grid { grid-template-columns: 1fr; } }
.cat {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); transition: transform .3s, border-color .3s, box-shadow .3s;
}
.cat:hover { transform: translateY(-4px); border-color: rgba(255, 242, 0, .55); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.cat .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--teal); }
.cat .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat:hover .thumb img { transform: scale(1.06); }
.cat .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--white); letter-spacing: -.01em; }
.cat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.cat .meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--aqua); }
.cat .meta .go { display: inline-flex; align-items: center; gap: 6px; color: var(--yellow); }
.cat .meta svg { width: 16px; height: 16px; }
.pill {
  position: absolute; top: 14px; left: 14px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .04em; background: rgba(0, 43, 61, .82); color: var(--white); backdrop-filter: blur(6px);
}

/* ---------- Contact ---------- */
.contact-band {
  border-radius: 28px; padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(ellipse 70% 70% at 100% 100%, rgba(22, 158, 210, .28), transparent 70%),
    linear-gradient(180deg, #003449, var(--midnight));
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start;
}
@media (max-width: 860px) { .contact-band { grid-template-columns: 1fr; } }
.contact-band h2 { margin: 8px 0 12px; font-size: clamp(30px, 4.4vw, 48px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; color: var(--white); }
.contact-band h2 span { color: var(--yellow); }
.contact-band p { color: var(--ink); margin: 0 0 22px; max-width: 460px; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .links { grid-template-columns: 1fr; } }
.links a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 43, 61, .55); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
  min-width: 0;
}
.links a:hover { border-color: var(--yellow); transform: translateY(-2px); }
.links .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(104, 203, 219, .14); color: var(--aqua); }
.links .ic svg { width: 18px; height: 18px; }
.links b { display: block; font-size: 14px; color: var(--white); }
.links small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mail-list a { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; word-break: break-all; }
.mail-list a:hover { color: var(--yellow); }
.mail-list svg { width: 18px; height: 18px; color: var(--aqua); flex: none; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--yellow); }

/* ---------- Dashboard gallery page (inside category) ---------- */
.gal-head { text-align: center; padding: clamp(40px, 7vw, 80px) 0 20px; }
.gal-head h1 { margin: 10px 0 6px; font-size: clamp(40px, 8vw, 96px); font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--white); text-transform: uppercase; }
.gal-head .sub { color: var(--muted); margin: 0; }
.switch { display: inline-flex; gap: 4px; padding: 4px; margin-top: 20px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.switch a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.switch a[aria-current="true"] { background: var(--yellow); color: var(--midnight); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 30px; }
.chip {
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line); transition: all .2s;
}
.chip:hover { border-color: var(--aqua); }
.chip[aria-pressed="true"] { background: var(--white); color: var(--midnight); border-color: var(--white); }
.chip .n { opacity: .55; margin-left: 4px; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; padding-bottom: 80px; }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--teal); border-radius: 4px; font: inherit; text-align: left;
}
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.tile:hover img { transform: scale(1.04); }
.tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; color: var(--white);
  background: linear-gradient(transparent, rgba(0, 20, 30, .9)); opacity: 0; transform: translateY(6px); transition: all .3s;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }
.tile .cap b { display: block; font-size: 15px; line-height: 1.3; }
.tile .cap small { font-size: 12px; color: var(--aqua); font-weight: 600; letter-spacing: .04em; }
@media (hover: none) { .tile .cap { opacity: 1; transform: none; } }

/* ---------- Lightbox (individual item) ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: #000; display: none; color: var(--white); }
.lb.open { display: grid; grid-template-columns: 1fr 360px; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 72px 72px 40px; min-width: 0; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; color: var(--white); transition: background .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn svg { width: 22px; height: 22px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-info { background: #fff; color: var(--charcoal); padding: 22px 26px; overflow-y: auto; }
.lb-info .tagline { color: var(--ocean); }
.lb-info h2 { margin: 10px 0 4px; font-size: 24px; font-weight: 900; letter-spacing: -.02em; color: var(--midnight); line-height: 1.2; }
.lb-info .cat-name { color: var(--teal); font-weight: 600; margin: 0 0 22px; }
.lb-info dl { margin: 0 0 24px; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; font-size: 14px; }
.lb-info dt { color: #5b6b70; }
.lb-info dd { margin: 0; font-weight: 600; color: var(--midnight); }
.lb-info .btn-primary { width: 100%; justify-content: center; }
.lb-info .note { font-size: 12.5px; color: #5b6b70; margin-top: 12px; }
.lb-info .counter { font-size: 13px; color: #5b6b70; margin-top: 24px; }
@media (max-width: 860px) {
  .lb.open { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-stage { padding: 64px 12px 12px; }
  .lb-stage img { max-height: calc(100vh - 330px); }
  .lb-prev, .lb-next { background: rgba(0, 0, 0, .45); }
  .lb-info { padding: 18px var(--pad) 22px; max-height: 260px; }
  .lb-info h2 { font-size: 20px; margin-top: 4px; }
  .lb-info .cat-name { margin-bottom: 12px; }
  .lb-info dl { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
