/* Kathirvelan (SK) Portfolio — dark & bold red/black theme */
:root {
  --red: #f12b35;
  --red-dark: #b90e1b;
  --bg: #0c0b0c;
  --surface: #151315;
  --ink: #f5f1ec;
  --muted: #9e9691;
  --line: rgba(245, 241, 236, .12);
  --font: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
a { color: inherit; text-decoration: none; }
img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.site-shell { max-width: 1600px; margin: 0 auto; overflow: hidden; }
.topbar { height: 92px; padding: 0 7.2%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.brand-logo { width: 38px; height: 38px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.brand-dot, .red-text { color: var(--red); }
.nav { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 700; }
.nav a { transition: color .2s ease; }
.nav a:hover, .text-link:hover { color: var(--red); }
.nav-contact { border: 1px solid var(--line); padding: 12px 18px; }
.nav-contact:hover { border-color: var(--red); }
.nav-contact span { margin-left: 10px; color: var(--red); }

.hero { min-height: min(82vh, 720px); padding: 80px 7.2% 96px; position: relative; display: flex; flex-direction: column; justify-content: center; }
.hero-copy { max-width: 960px; }
.eyebrow, .section-label, .hero-bottom, .visual-tag, .contact-bottom { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.status-dot { width: 9px; height: 9px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 4px rgba(241, 43, 53, .18); }
h1 { margin: 24px 0 28px; font-size: clamp(58px, 9.5vw, 136px); line-height: .91; letter-spacing: -.075em; font-weight: 800; }
.outline-text { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hero-intro { max-width: 680px; color: var(--muted); font-size: 20px; line-height: 1.65; }
.hero-intro strong { color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 32px; margin-top: 38px; flex-wrap: wrap; }
.button { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 0 26px; font-size: 15px; font-weight: 800; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-3px); }
.button-red { background: var(--red); color: white; }
.button-red:hover { background: var(--red-dark); }
.button span { font-size: 19px; }
.text-link { font-size: 15px; font-weight: 800; }
.text-link span { color: var(--red); margin-left: 8px; }
.hero-bottom { position: absolute; bottom: 28px; left: 7.2%; right: 7.2%; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }

.section { padding: 115px 7.2%; border-top: 1px solid var(--line); }
.section-label { color: var(--muted); }
.section-label span { color: var(--red); margin-right: 10px; }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; margin-top: 52px; }
h2 { margin: 0; font-size: clamp(46px, 6.5vw, 84px); line-height: .98; letter-spacing: -.06em; }
.about-text { max-width: 560px; padding-top: 6px; }
.about-text p { color: var(--muted); font-size: 19px; line-height: 1.75; margin: 0 0 22px; }
.underlined-link { display: inline-block; margin-top: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--red); font-size: 16px; font-weight: 800; }
.underlined-link span { color: var(--red); margin-left: 12px; }

.work-section { background: var(--surface); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 45px; gap: 24px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.project-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 22px; align-items: start; }
.project-card { min-width: 0; cursor: pointer; }
.project-visual { height: 320px; position: relative; overflow: hidden; border: 1px solid var(--line); background: #0c0b0c; }
.project-large .project-visual { height: 390px; }
.project-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(12, 11, 12, .65) 0%, transparent 35%); pointer-events: none; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.project-card:hover .project-visual img { transform: scale(1.04); }
.visual-tag { position: absolute; top: 16px; left: 16px; z-index: 2; color: #fff; background: rgba(12, 11, 12, .78); padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .2); font-size: 12px; }
.project-meta { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 0; gap: 12px; }
.project-meta h3 { font-size: 19px; margin: 0 0 6px; }
.project-meta p { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0; }
.project-arrow { font-size: 26px; color: var(--red); flex-shrink: 0; }

.skills-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; margin-top: 52px; }
.skill-list { border-top: 1px solid var(--line); }
.skill-list > div { display: grid; grid-template-columns: 48px 1fr 24px; align-items: center; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.skill-list > div > span:first-child { font-family: var(--mono); color: var(--red); font-size: 14px; }
.skill-list h3 { margin: 0; font-size: 20px; font-weight: 700; }
.skill-plus { color: var(--red); font-size: 20px; }

.contact-section { background: var(--red); color: white; padding: 85px 7.2% 32px; }
.contact-section .section-label { color: rgba(255, 255, 255, .82); }
.contact-section .section-label span { color: white; }
.contact-eyebrow { margin-top: 80px; color: rgba(255, 255, 255, .88); }
.contact-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 22px 0 36px; }
.contact-section h2 { font-size: clamp(54px, 8.8vw, 116px); margin: 0; }
.contact-section h2 span { color: transparent; -webkit-text-stroke: 1.5px white; }
.paypal-btn { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.5); color: white; padding: 12px 20px; font-size: 15px; font-weight: 800; letter-spacing: .04em; transition: background .2s, border-color .2s; white-space: nowrap; flex-shrink: 0; margin-bottom: 10px; }
.paypal-btn:hover { background: rgba(255,255,255,.24); border-color: white; }
.paypal-btn svg { width: 22px; height: 22px; fill: white; }
.contact-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.button-light { background: var(--bg); color: var(--ink); }
.button-light:hover { background: #1e1b1e; }
.button-discord { background: #5865F2; color: white; gap: 14px; }
.button-discord:hover { background: #4752c4; }
.button-discord svg { width: 22px; height: 22px; fill: white; flex-shrink: 0; }
.contact-bottom { margin-top: 72px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .35); display: flex; justify-content: space-between; color: rgba(255, 255, 255, .9); font-size: 13px; }
.contact-bottom a:hover { color: white; }

@media (max-width: 850px) {
  .topbar { padding: 0 5%; height: 78px; }
  .nav { gap: 20px; font-size: 14px; }
  .hero { padding: 68px 5% 84px; min-height: 540px; }
  .section { padding: 85px 5%; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-large { grid-column: span 2; }
  .project-large .project-visual { height: 340px; }
  .skills-layout, .about-content { gap: 6%; }
}
@media (max-width: 600px) {
  .topbar { height: 70px; }
  .brand { font-size: 19px; gap: 10px; }
  .brand-logo { width: 32px; height: 32px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav a:nth-child(1), .nav a:nth-child(3) { display: none; }
  .nav-contact { padding: 10px 13px; }
  .hero { padding: 56px 6% 84px; min-height: auto; }
  h1 { font-size: clamp(54px, 15vw, 88px); }
  .hero-intro { font-size: 18px; }
  .eyebrow, .section-label { font-size: 12px; }
  .hero-bottom { left: 6%; right: 6%; font-size: 12px; }
  .hero-bottom span:last-child { display: none; }
  .section { padding: 72px 6%; }
  .about-content, .skills-layout { grid-template-columns: 1fr; gap: 30px; margin-top: 36px; }
  .about-content h2, .skills-layout h2 { font-size: 48px; }
  .about-text p { font-size: 17px; }
  .section-heading { align-items: start; gap: 16px; flex-direction: column; margin-bottom: 30px; }
  .project-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-large { grid-column: auto; }
  .project-large .project-visual, .project-visual { height: 300px; }
  .contact-bottom { font-size: 12px; }
}

.lightbox { position: fixed; inset: 0; background: rgba(12, 11, 12, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 24px; z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .32s ease, visibility .32s ease; touch-action: none; }
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, .75); will-change: transform, opacity, filter; }
.lightbox.is-entering .lightbox-img { animation: lightbox-in .44s cubic-bezier(.22, 1.25, .36, 1) forwards; }
.lightbox.is-dragging .lightbox-img { animation: none; transition: none; }
.lightbox.is-closing-btn .lightbox-img { animation: lightbox-out-btn .3s cubic-bezier(.4, 0, 1, 1) forwards; }
.lightbox.is-closing-swipe-up .lightbox-img { animation: lightbox-out-up .32s cubic-bezier(.32, 0, .67, 0) forwards; }
.lightbox.is-closing-swipe-down .lightbox-img { animation: lightbox-out-down .32s cubic-bezier(.32, 0, .67, 0) forwards; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(21, 19, 21, .75); border: 1px solid var(--line); border-radius: 50%; width: 46px; height: 46px; display: grid; place-items: center; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; transform: rotate(-90deg) scale(.6); opacity: 0; transition: transform .35s cubic-bezier(.22, 1.25, .36, 1), opacity .25s ease, border-color .2s ease, color .2s ease; }
.lightbox.is-open .lightbox-close { transform: rotate(0deg) scale(1); opacity: 1; }
.lightbox.is-closing-btn .lightbox-close { transform: rotate(90deg) scale(.4); opacity: 0; }
.lightbox-close:hover { color: var(--red); border-color: var(--red); }

@keyframes lightbox-in {
  0% { opacity: 0; transform: translateY(38px) scale(.62) rotate(-3deg); filter: blur(6px); box-shadow: 0 0 0 2px var(--red), 0 0 45px rgba(241, 43, 53, .55); }
  70% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); box-shadow: 0 24px 70px rgba(0, 0, 0, .75); }
}

@keyframes lightbox-out-btn {
  0% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
  100% { opacity: 0; transform: scale(.48) rotate(7deg); filter: blur(8px); }
}

@keyframes lightbox-out-up {
  0% { opacity: 1; transform: translateY(var(--drag-y, 0px)) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-105vh) scale(.84) rotate(-5deg); }
}

@keyframes lightbox-out-down {
  0% { opacity: 1; transform: translateY(var(--drag-y, 0px)) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(105vh) scale(.84) rotate(5deg); }
}
