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

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --border: #1f1f2e;
  --accent: #ff4d00;
  --accent2: #ffb800;
  --text: #e8e8f0;
  --muted: #a0a0b5;
  --white: #ffffff;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Mono', monospace;
  --font-serif: 'Instrument Serif', serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tr: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Selection color */
::selection {
  background: var(--accent);
  color: var(--white);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  font-weight: 400;
}

p {
  font-weight: 450;
  color: var(--text);
}

/* Hide custom cursor on form inputs */
input, textarea, button, a {
  cursor: auto;
}

@media (pointer: fine) {
  input, textarea, button, a {
    cursor: pointer;
  }
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: .4;
}

#cur-dot, #cur-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

#cur-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

#cur-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 77, 0, .45);
  transition: width .35s var(--ease), height .35s var(--ease), border-color .3s;
}

body:has(a:hover) #cur-ring, body:has(button:hover) #cur-ring {
  width: 58px;
  height: 58px;
  border-color: var(--accent);
}

/* Scrollbar - wider for better usability */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, padding .4s;
}

nav.scrolled {
  border-color: var(--border);
  padding: 1rem 4rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -.02em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  position: relative;
  transition: color .3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .3s var(--ease);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--accent);
  color: var(--white);
  padding: .5rem 1.3rem;
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  transition: background .3s, transform .2s;
}

.nav-cta:hover {
  background: #ff6620;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: .3s;
}

.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 10, 15, .97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mob-menu.open { display: flex; }

.mob-menu a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -.04em;
  transition: color .2s;
}

.mob-menu a:hover { color: var(--accent); }

/* Larger touch target for close button */
.mob-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

section {
  padding: 7rem 4rem;
  position: relative;
  z-index: 2;
}

.section-tag {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.section-tag::before {
  content: '';
  flex: none;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--accent);
  font-weight: 400;
}

/* Enhanced divider */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), var(--accent), transparent);
  position: relative;
  z-index: 2;
}

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4rem;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.hero-bg-text {
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(7rem, 17vw, 19rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 77, 0, 0.08);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  animation: floatBg 9s ease-in-out infinite;
}

@keyframes floatBg {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(-52%) translateX(-12px); }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 77, 0, .1);
  border: 1px solid rgba(255, 77, 0, .3);
  color: var(--accent);
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  width: fit-content;
  animation: fadeUp .8s var(--ease) both;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: .93;
  letter-spacing: -.04em;
  color: var(--white);
  animation: fadeUp .8s .15s var(--ease) both;
}

.hero-name em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 500px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.85;
  animation: fadeUp .8s .3s var(--ease) both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  animation: fadeUp .8s .45s var(--ease) both;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: .85rem 1.8rem;
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: var(--tr);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 77, 0, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .15);
  transform: translateX(-101%);
  transition: transform .4s var(--ease);
}

.btn-primary:hover::before { transform: translateX(0); }

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(255, 77, 0, .45);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  padding: .85rem 1.8rem;
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: var(--tr);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  flex-wrap: wrap;
  animation: fadeUp .8s .6s var(--ease) both;
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--white);
  text-shadow: 0 0 10px rgba(255, 77, 0, 0.3);
}

.stat-num span { color: var(--accent); }

.stat-label {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  animation: fadeUp 1s .9s var(--ease) both;
  z-index: 3;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDrop 1.6s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

#about { background: rgba(17, 17, 24, .82); backdrop-filter: blur(4px); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: center;
  margin-top: 3rem;
}

.about-image-wrap {
  position: relative;
  max-width: 400px;
  margin-left: 80px;
}

/* Fixed: removed padding so image fills frame */
.about-image-frame {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--border);
  border-radius: 4px;
  overflow: visible;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
  padding: 0;
}

.about-image-frame svg { opacity: .25; }

/* Fixed: adjusted accent box position */
.about-accent-box {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  background: var(--accent);
  padding: 1rem 1.2rem;
  border-radius: 3px;
  z-index: 10;
}

.about-accent-box p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  line-height: 1;
}

.about-accent-box span {
  font-size: .65rem;
  color: rgba(255, 255, 255, .7);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.9;
}

.about-text p strong {
  color: var(--text);
  font-family: var(--font-display);
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-item {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.1rem;
  transition: border-color .3s, transform .3s;
  background: rgba(10, 10, 15, .5);
}

.highlight-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.highlight-item .icon { font-size: 1.2rem; margin-bottom: .35rem; }
.highlight-item h4 {
  font-family: var(--font-display);
  font-size: .83rem;
  color: var(--white);
  font-weight: 700;
}
.highlight-item p {
  font-size: .73rem;
  color: var(--muted);
  margin: 0;
}

#skills { background: transparent; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}

.skill-category {
  background: rgba(17, 17, 24, .9);
  padding: 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}

.skill-category::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .5s var(--ease);
}

.skill-category:hover::before { width: 100%; }
.skill-category:hover { background: rgba(255, 77, 0, .06); }

.skill-cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; }

.skill-tag {
  background: rgba(31, 31, 46, .95);
  color: var(--text);
  padding: .3rem .8rem;
  border-radius: 2px;
  font-size: .74rem;
  transition: background .2s, color .2s, transform .2s;
  cursor: default;
}

.skill-tag:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.06);
}

.skills-bars { margin-top: 3.5rem; }
.skills-bars h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.skills-bars h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.skill-bar-item { margin-bottom: 1.3rem; }
.skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: .45rem;
}
.skill-bar-name { font-size: .8rem; color: var(--text); }
.skill-bar-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  color: var(--accent);
}
.skill-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  width: 0;
  transition: width 1.3s var(--ease);
}

#projects {
  background: rgba(17, 17, 24, .82);
  backdrop-filter: blur(4px);
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Projects header buttons layout */
.projects-header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.project-card {
  background: rgba(17, 17, 24, .92);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background .3s;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height .4s var(--ease);
}

.project-card:hover::after { height: 100%; }
.project-card:hover {
  background: rgba(255, 77, 0, .05);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.5);
}

/* Featured project styling */
.project-card.featured {
  border: 1px solid rgba(255, 77, 0, 0.3);
  box-shadow: 0 0 20px rgba(255, 77, 0, 0.15);
  background: rgba(255, 77, 0, 0.03);
}

.project-card.featured .project-num {
  color: var(--accent2);
}

/* Project images */
.project-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 4px;
  margin: 0.5rem 0;
  background: var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Project meta info */
.project-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.project-num {
  font-family: var(--font-display);
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .15em;
  font-weight: 700;
}

.project-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.project-desc {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.7;
  flex: 1;
}

.project-tech { display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-pill {
  background: rgba(255, 77, 0, .08);
  border: 1px solid rgba(255, 77, 0, .2);
  color: var(--accent);
  padding: .22rem .7rem;
  border-radius: 100px;
  font-size: .7rem;
}

.project-links { display: flex; gap: 1rem; margin-top: .3rem; }
.project-link {
  color: var(--muted);
  text-decoration: none;
  font-size: .76rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: color .2s;
  position: relative;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.project-link:hover {
  color: var(--accent);
}

.project-link:hover::after {
  width: 100%;
}

#education { background: transparent; }
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.edu-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
  background: rgba(17, 17, 24, .85);
  min-height: 100%;
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.edu-card:hover::before { transform: scaleX(1); }
.edu-card:hover {
  border-color: rgba(255, 77, 0, .3);
  transform: translateY(-4px);
}

.edu-badge {
  display: inline-block;
  background: rgba(255, 77, 0, .15);
  border: 1px solid rgba(255, 77, 0, .3);
  color: var(--accent);
  padding: .25rem .8rem;
  border-radius: 2px;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.edu-degree {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: .3rem;
}

.edu-school {
  color: var(--muted);
  font-size: .83rem;
  margin-bottom: 1rem;
}

.edu-desc {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.8;
}

.learning-list {
  list-style: none;
  margin-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.learning-list li {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.learning-list li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
}

#contact {
  background: rgba(17, 17, 24, .82);
  backdrop-filter: blur(4px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  margin-top: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -.03em;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.contact-info p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .3s, transform .3s, background .3s;
  background: rgba(10, 10, 15, .5);
}
.contact-link-item:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  background: rgba(255, 77, 0, .05);
}
.link-icon {
  width: 34px;
  height: 34px;
  background: var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.link-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: .83rem;
}
.link-val { font-size: .76rem; color: var(--muted); }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.form-group input, .form-group textarea {
  background: rgba(10, 10, 15, .8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .8rem 1rem;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: .88rem;
  transition: border-color .3s, box-shadow .3s;
  outline: none;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, .1);
}
.form-group textarea { min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: .9rem 1.8rem;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: var(--tr);
  align-self: center;
}

.btn-submit:hover {
  background: #ff6620;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 77, 0, .3);
}
#form-ok {
  display: none;
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--accent);
  text-align: center;
}

footer {
  border-top: 2px solid var(--border);
  padding: 2.2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 17, 24, .95);
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.footer-copy {
  color: var(--muted);
  font-size: .76rem;
}
.footer-copy span { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .76rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

.back-top {
  width: 38px;
  height: 38px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: var(--tr);
  font-size: .95rem;
}
.back-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

/* Responsive - Tablet */
@media (max-width: 1024px) {
  nav { padding: 1.5rem 2rem; }
  section { padding: 5rem 2rem; }
  #hero { padding: 0 2rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-image-wrap { 
    max-width: 280px; 
    margin: 0 auto;
  }
  .hero-scroll {
    display: none;
  }
  .about-image-frame { aspect-ratio: 1/1; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  footer { padding: 1.8rem 2rem; }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  nav { padding: 1.1rem 1.4rem; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  section { padding: 3rem 1rem; }
  .hero-scroll {
    display: none;
  }
  #hero { 
    padding: 0 1rem; 
    padding-top: 100px;
  }
  
  .hero-name {
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1.15;
  }
  
  .hero-sub {
    font-size: 0.8rem;
    margin-top: 0.8rem;
  }
  
  .hero-stats {
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .stat-num {
    font-size: 1.2rem;
  }
  
  .stat-label {
    font-size: 0.5rem;
  }
  
  .hero-bg-text {
    font-size: 30vw;
  }
  
  .hero-tag {
    font-size: 0.6rem;
    padding: 0.25rem 0.7rem;
  }
  
  .hero-actions {
    gap: 0.7rem;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }
  
  /* PROFILE PICTURE FIX - Fully visible */
  .about-image-wrap {
    margin-left: 0;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .about-image-frame {
    aspect-ratio: 1/1;
    width: 100%;
  }
  
  .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .radiant-border::before {
    inset: -2px;
  }
  
  .radiant-border::after {
    inset: -1px;
  }
  
  .about-accent-box {
    bottom: -0.6rem;
    right: -0.6rem;
    padding: 0.4rem 0.6rem;
  }
  
  .about-accent-box p {
    font-size: 0.8rem;
  }
  
  .about-accent-box span {
    font-size: 0.45rem;
  }
  
  .about-grid {
    gap: 1.5rem;
  }
  
  .about-text p {
    font-size: 0.8rem;
  }
  
  .about-highlights {
    gap: 0.7rem;
  }
  
  .highlight-item {
    padding: 0.7rem;
  }
  
  .highlight-item h4 {
    font-size: 0.75rem;
  }
  
  .highlight-item p {
    font-size: 0.7rem;
  }
  
  /* SKILLS SECTION */
  .skill-category {
    padding: 1rem;
  }
  
  .skill-cat-title {
    font-size: 0.7rem;
  }
  
  .skill-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }
  
  .skills-bars h3 {
    font-size: 0.9rem;
  }
  
  .skill-bar-name, .skill-bar-pct {
    font-size: 0.7rem;
  }
  
  /* PROJECT IMAGES FIX - Full visibility without cropping */
  .project-image {
    height: auto;
    max-height: 160px;
  }
  
  .project-image img {
    object-fit: contain;
    width: 100%;
    height: auto;
    max-height: 160px;
  }
  
  .project-card {
    padding: 1rem;
  }
  
  .project-name {
    font-size: 1rem;
  }
  
  .project-desc {
    font-size: 0.75rem;
  }
  
  .tech-pill {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
  }
  
  .project-meta {
    font-size: 0.6rem;
    gap: 0.7rem;
    flex-wrap: wrap;
  }
  
  /* EDUCATION SECTION */
  .edu-card {
    padding: 1rem;
  }
  
  .edu-degree {
    font-size: 0.95rem;
  }
  
  .edu-school, .edu-desc {
    font-size: 0.75rem;
  }
  
  .learning-list li {
    font-size: 0.7rem;
  }
  
  /* CONTACT SECTION */
  .contact-grid {
    gap: 2rem;
  }
  
  .contact-info h3 {
    font-size: 1.2rem;
  }
  
  .contact-info p {
    font-size: 0.8rem;
  }
  
  .contact-link-item {
    padding: 0.6rem 0.8rem;
  }
  
  .link-label {
    font-size: 0.75rem;
  }
  
  .link-val {
    font-size: 0.65rem;
  }
  
  .form-group input, .form-group textarea {
    padding: 0.6rem;
    font-size: 0.8rem;
  }
  
  .btn-submit {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
  
  .form-row { grid-template-columns: 1fr; }
  footer { padding: 1.4rem; flex-direction: column; text-align: center; }
  .about-highlights { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-tags { justify-content: center; }
  .footer-links a { font-size: 0.8rem; }
  .btn-submit { align-self: stretch; justify-content: center; }
  #bg-canvas { opacity: 0.7; }
  
  /* Projects header responsive */
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .projects-header-buttons {
    width: 100%;
  }
  
  .projects-header-buttons .btn-primary,
  .projects-header-buttons .btn-secondary {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* Radiant Orange Border for Profile Picture */
.radiant-border {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  position: relative;
  z-index: 3;
}

.radiant-border::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(45deg, 
    var(--accent), 
    #ff6620, 
    var(--accent2), 
    var(--accent),
    #ff6620);
  border-radius: 6px;
  animation: radiantGlow 3s linear infinite;
  background-size: 200% 200%;
}

.radiant-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--surface);
  border-radius: 5px;
  z-index: 1;
}

@keyframes radiantGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Fix form layout inside contact section */
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

/* ============================================
   SUBTLE HOVER EFFECTS (Eye‑friendly)
   ============================================ */

/* Project Cards - Gentle lift & soft glow */
.project-card {
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1),
              box-shadow 0.3s ease,
              background 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px -12px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 77, 0, 0.2);
}

/* Education Cards - Same subtle lift */
.edu-card {
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1),
              box-shadow 0.3s ease,
              border-color 0.3s;
}
.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px -12px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 77, 0, 0.2);
}

/* Skill Category Cards */
.skill-category {
  transition: transform 0.2s ease, box-shadow 0.3s;
}
.skill-category:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.3);
}

/* Highlight Items */
.highlight-item {
  transition: transform 0.2s ease, box-shadow 0.3s, border-color 0.2s;
}
.highlight-item:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.3);
}

/* Buttons - Gentle scale & shadow */
.btn-primary, .btn-secondary, .btn-submit, .nav-cta, .back-top {
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28),
              box-shadow 0.2s,
              background 0.2s;
}
.btn-primary:hover, .btn-secondary:hover, .btn-submit:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px -8px rgba(255, 77, 0, 0.3);
}
.nav-cta:hover {
  transform: translateY(-2px) scale(1.02);
}
.back-top:hover {
  transform: translateY(-4px) scale(1.05);
}

/* Contact link items - Soft slide */
.contact-link-item {
  transition: transform 0.2s ease, background 0.3s, border-color 0.2s, box-shadow 0.3s;
}
.contact-link-item:hover {
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 6px 15px -8px rgba(255, 77, 0, 0.2);
}

/* ============================================
   SUBTLE MOVING GRADIENT BORDER (Low Opacity)
   ============================================ */

.project-card,
.edu-card,
.skill-category,
.highlight-item {
  position: relative;
  isolation: isolate;
}

/* Gradient border – much softer and darker */
.project-card::before,
.edu-card::before,
.skill-category::before,
.highlight-item::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    90deg,
    rgba(255, 77, 0, 0.3),
    rgba(255, 184, 0, 0.3),
    rgba(255, 85, 119, 0.3),
    rgba(255, 77, 0, 0.3),
    rgba(255, 184, 0, 0.3)
  );
  background-size: 300% 100%;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  pointer-events: none;
}

/* On hover, show the gradient with low opacity and slower animation */
.project-card:hover::before,
.edu-card:hover::before,
.skill-category:hover::before,
.highlight-item:hover::before {
  opacity: 0.6;
  animation: gradientShift 4s linear infinite;
}

/* Ensure inner content stays above */
.project-card > *,
.edu-card > *,
.skill-category > *,
.highlight-item > * {
  position: relative;
  z-index: 2;
}

/* Keep the left orange bar above the gradient */
.project-card::after {
  z-index: 3;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* Submit button pulse – very subtle */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.2); }
  70% { box-shadow: 0 0 0 6px rgba(255, 77, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
}
.btn-submit:disabled {
  opacity: 0.8;
  animation: pulse 1.5s infinite;
}
.btn-submit:active {
  transform: scale(0.98);
}