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

:root {
  --black: #0d0d0d;
  --dark-gray: #1a1a1a;
  --orange-start: #ff7a3d;
  --orange-end: #ff914d;
  --white: #ffffff;
  --text-gray: #e0e0e0;
  --accent-color: #252525;
  --glow-color: rgba(255, 122, 61, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--black);
  background-image: -webkit-radial-gradient(
      circle at 100% 0%,
      var(--orange-start) 0%,
      rgba(13, 13, 13, 0) 25%
    ),
    -webkit-radial-gradient(
      circle at 0% 100%,
      var(--orange-end) 0%,
      rgba(13, 13, 13, 0) 25%
    );
  background-image: radial-gradient(
      circle at 100% 0%,
      var(--orange-start) 0%,
      transparent 25%
    ),
    radial-gradient(circle at 0% 100%, var(--orange-end) 0%, transparent 25%);
  min-height: 100vh;
  color: var(--white);
  overflow-x: hidden;
  position: relative;
}

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

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  z-index: 100;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 1) 0%,
    rgba(13, 13, 13, 0.8) 50%,
    rgba(13, 13, 13, 0) 100%
  );
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.logo::after{
  content:"_";
  position: absolute;
  right: -14px;
  animation: blink 1.5s step-end infinite;
  color: var(--orange-start);
}

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

.location-time {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 300;
  padding: 0.5rem 1rem;
}

#local-time {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--orange-start);
}

.location {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
}

.location::before {
  content: "•";
  margin-right: 0.5rem;
  opacity: 0.5;
}

/* ==================== BACKGROUND ACCENTS ==================== */
.bg-accents {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.accent {
  position: absolute;
  opacity: 0;
  filter: blur(2px);
  animation: fadeInScale 1.5s ease-out forwards;
}

.accent-1 {
  top: 20%;
  left: 5%;
  animation-delay: 0.3s;
  transform: rotate(-15deg);
}

.accent-2 {
  top: 30%;
  right: 8%;
  animation-delay: 0.6s;
  transform: rotate(25deg);
}

.accent-3 {
  bottom: 25%;
  left: 8%;
  animation-delay: 0.9s;
  transform: rotate(45deg);
}

.accent-4 {
  bottom: 15%;
  right: 15%;
  animation-delay: 1.2s;
  transform: rotate(-10deg);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  to {
    opacity: 0.7;
    transform: scale(1) rotate(var(--rotation, 0deg));
  }
}

/* Background lines */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(255, 255, 255, 0.02) 25%,
      rgba(255, 255, 255, 0.02) 26%,
      transparent 27%,
      transparent 74%,
      rgba(255, 255, 255, 0.02) 75%,
      rgba(255, 255, 255, 0.02) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(255, 255, 255, 0.02) 25%,
      rgba(255, 255, 255, 0.02) 26%,
      transparent 27%,
      transparent 74%,
      rgba(255, 255, 255, 0.02) 75%,
      rgba(255, 255, 255, 0.02) 76%,
      transparent 77%,
      transparent
    );
  background-size: 50px 50px;
  z-index: -1;
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  padding: 6rem 2rem 2rem;
}

@media (min-width: 992px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
  }
}

.portrait-container {
  position: relative;
  margin: 1rem auto 3rem;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUpFadeIn 1s ease-out 0.2s forwards;
  max-width: 90%;
}

@media (min-width: 992px) {
  .portrait-container {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
}

.portrait {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  animation: float 6s ease-in-out infinite;
  image-rendering: optimizeQuality;
}

/* Photo glow effect */
.portrait-container::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(
    ellipse at center,
    var(--glow-color) 0%,
    transparent 70%
  );
  z-index: -1;
  opacity: 0.8;
  filter: blur(20px);
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.intro-text {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 992px) {
  .intro-text {
    text-align: left;
    margin: 0;
  }
}

.intro-line {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-gray);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFadeIn 0.8s ease-out 0.6s forwards;
  position: relative;
  display: inline-block;
}

.intro-line::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 1px;
  background: var(--orange-start);
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
}

@media (min-width: 992px) {
  .intro-line::before {
    display: block;
  }
}

.headline {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFadeIn 0.8s ease-out 0.9s forwards;
  background: linear-gradient(to right, var(--white), var(--orange-end));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.tagline {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-gray);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFadeIn 0.8s ease-out 1.2s forwards;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 122, 61, 0.2);
  display: inline-block;
}

/* ==================== LINKS SECTION ==================== */
.links-section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 950px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.5rem;
}

/* Each link takes 2 columns */
.links-section a.link-btn {
  grid-column: span 2;
}

/* First row: 3 links (taking 6 columns total) */
/* Second row: 2 links (centered using the special rules) */

/* If there are two items in the last row (our case) */
.links-section:has(> :last-child:nth-child(3n + 2))
  a.link-btn:nth-last-child(2) {
  grid-column: 2 / span 2;
}

.links-section:has(> :last-child:nth-child(3n + 2))
  a.link-btn:nth-last-child(1) {
  grid-column: 4 / span 2;
}

/* Add a subtle separator between rows */
.links-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 122, 61, 0.2),
    transparent
  );
  transform: translateX(-50%);
  pointer-events: none;
}

/* Removed the ::after pseudo-element as it's not needed with the new grid layout */

/* Mobile view - stack everything */
@media (max-width: 767px) {
  .links-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    margin: 1rem auto;
  }

  /* Reset grid styles for mobile */
  .links-section a.link-btn {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .links-section::after,
  .links-section::before {
    display: none;
  }
}

/* Button dimming effect */
.btn-dimmed {
  opacity: 0.6;
  transform: scale(0.98);
}

/* Dynamic ripple effect */
.dynamic-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 122, 61, 0.4) 0%,
    rgba(255, 145, 77, 0.1) 70%
  );
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(
    to right,
    rgba(26, 26, 26, 0.4) 0%,
    rgba(26, 26, 26, 0.2) 100%
  );
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  height: 100%;
}

.link-btn:nth-child(1) {
  animation: slideUpFadeIn 0.6s ease-out 1.5s forwards;
}
.link-btn:nth-child(2) {
  animation: slideUpFadeIn 0.6s ease-out 1.6s forwards;
}
.link-btn:nth-child(3) {
  animation: slideUpFadeIn 0.6s ease-out 1.7s forwards;
}
.link-btn:nth-child(4) {
  animation: slideUpFadeIn 0.6s ease-out 1.8s forwards;
}
.link-btn:nth-child(5) {
  animation: slideUpFadeIn 0.6s ease-out 1.9s forwards;
}

.link-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  padding: 10px;
  border-radius: 0;
  background: none;
  color: var(--orange-start);
  width: 42px;
  height: 42px;
}

.link-btn:hover {
  background: linear-gradient(
    to right,
    rgba(255, 122, 61, 0.2) 0%,
    rgba(255, 145, 77, 0.1) 100%
  );
  transform: translateY(-3px);
}

.link-btn:hover .link-icon {
  transform: rotate(5deg) scale(1.1);
  color: var(--white);
}

.link-btn:active {
  transform: translateY(-1px);
}

/* Hover line effect */
.link-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--orange-start);
  transition: width 0.4s ease;
}

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

/* Ripple effect */
.link-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 122, 61, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.link-btn.ripple::before {
  width: 300px;
  height: 300px;
}

/* ==================== FOOTER ==================== */
.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-gray);
  font-weight: 300;
  margin-top: 2rem;
  background: linear-gradient(
    to top,
    rgba(13, 13, 13, 0.6) 0%,
    rgba(13, 13, 13, 0) 80%
  );
}

.heart-icon {
  vertical-align: middle;
  margin: 0 3px;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.footer p {
  position: relative;
  display: inline-block;
}

.footer p::before,
.footer p::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: rgba(255, 122, 61, 0.3);
  transform: translateY(-50%);
}

.footer p::before {
  left: -45px;
}

.footer p::after {
  right: -45px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .location-time {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }

  #local-time {
    font-size: 0.8rem;
  }

  .headline {
    font-size: 1.6rem;
  }

  .intro-line {
    font-size: 0.9rem;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .link-btn {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .links-section {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem;
  }

  .logo {
    font-size: 1rem;
  }

  .location-time {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    gap: 0.5rem;
  }

  #local-time {
    font-size: 0.75rem;
  }

  .headline {
    font-size: 1.4rem;
  }

  .intro-line {
    font-size: 0.85rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .link-btn {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .link-icon {
    padding: 6px;
  }
}

/* Custom scroll bar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--orange-start);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange-end);
}

@media screen and (max-width: 768px) {
  * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  ::-webkit-scrollbar {
    display: none;
  }
}
