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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Cormorant Garamond', serif;
}

/* ── Sky Background ── */

.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #4a90d9 0%, #87ceeb 40%, #b0e0f0 70%, #d4effc 100%);
  z-index: 0;
}

.clouds-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: auto 100%;
}

.clouds-layer-1 {
  background-image:
    radial-gradient(ellipse 120px 50px at 80px 25%, rgba(255,255,255,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 100px 40px at 130px 30%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 80px 35px at 50px 35%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(ellipse 150px 55px at 350px 20%, rgba(255,255,255,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 110px 45px at 400px 25%, rgba(255,255,255,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 90px 40px at 320px 30%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(ellipse 130px 50px at 650px 30%, rgba(255,255,255,0.85) 0%, transparent 70%),
    radial-gradient(ellipse 100px 40px at 700px 35%, rgba(255,255,255,0.75) 0%, transparent 70%),
    radial-gradient(ellipse 140px 50px at 950px 22%, rgba(255,255,255,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 105px 42px at 1000px 28%, rgba(255,255,255,0.8) 0%, transparent 70%);
  animation: drift 60s linear infinite;
  opacity: 0.9;
}

.clouds-layer-2 {
  background-image:
    radial-gradient(ellipse 180px 70px at 200px 50%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 140px 55px at 260px 55%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 160px 60px at 550px 45%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 130px 50px at 600px 50%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 170px 65px at 900px 48%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 120px 48px at 950px 53%, rgba(255,255,255,0.5) 0%, transparent 70%);
  animation: drift 90s linear infinite;
  opacity: 0.6;
}

.clouds-layer-3 {
  background-image:
    radial-gradient(ellipse 250px 90px at 100px 70%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 200px 75px at 170px 75%, rgba(255,255,255,0.3) 0%, transparent 70%),
    radial-gradient(ellipse 220px 80px at 500px 65%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 190px 70px at 560px 70%, rgba(255,255,255,0.3) 0%, transparent 70%),
    radial-gradient(ellipse 240px 85px at 850px 68%, rgba(255,255,255,0.35) 0%, transparent 70%);
  animation: drift 120s linear infinite;
  opacity: 0.4;
}

@keyframes drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* ── Cube Container ── */

#cube-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#cube-container.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.scene {
  width: 280px;
  height: 280px;
  perspective: 800px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-15deg) rotateY(30deg);
  cursor: grab;
  transition: transform 0.05s linear;
}

.cube.navigating {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.cube:active {
  cursor: grabbing;
}

.cube-face {
  position: absolute;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
  color: #222;
  background: #b0b0b0;
  border: 3px solid #888;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.15);
  user-select: none;
  cursor: pointer;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow:
    1px 1px 0 rgba(0,0,0,0.15),
    -1px -1px 0 rgba(255,255,255,0.2);
}

.cube-face:hover {
  background: #c8c8c8;
  color: #000;
}

.cube-face.portrait-face {
  background-color: transparent;
  box-shadow: none;
  filter: grayscale(100%);
}

.cube-face.portrait-face:hover {
  background-color: transparent;
}

.cube-face.name-face {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 8px;
}

.cube-face.front  { transform: rotateY(0deg) translateZ(140px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(140px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(140px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(140px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(140px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(140px); }

/* ── Page Container ── */

#page-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow-y: auto;
}

#page-container.hidden {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: #222;
  background: #b0b0b0;
  border: 3px solid #888;
  padding: 8px 20px;
  cursor: pointer;
  letter-spacing: 2px;
  z-index: 10;
  transition: background 0.2s;
}

.back-btn:hover {
  background: #c8c8c8;
  color: #000;
}

.page-content {
  max-width: 700px;
  width: 100%;
  margin-top: 60px;
  background: rgba(176, 176, 176, 0.9);
  border: 3px solid #888;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.page-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 600;
  color: #222;
  margin-bottom: 24px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.page-content p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: #333;
  line-height: 1.7;
  margin-bottom: 16px;
}

.page-content p:last-child {
  margin-bottom: 0;
}

/* ── Experience Page ── */

.job {
  margin-bottom: 32px;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  margin-bottom: 12px;
}

.job-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.job-role {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  font-style: italic;
  color: #333;
  margin-bottom: 2px;
}

.job-date {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 300;
  color: #555;
  letter-spacing: 1px;
}

.page-content ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.page-content ul li {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  color: #333;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.page-content ul li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: #888;
}

.tech-tags {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  color: #555;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.15);
  letter-spacing: 1px;
}

.section-divider {
  border-top: 2px solid #888;
  margin: 32px 0;
}

/* ── Contact Page ── */

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.contact-item a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-item a:hover {
  border-bottom-color: #111;
}

/* ── Projects Page ── */

.project {
  margin-bottom: 28px;
}

.project:last-child {
  margin-bottom: 0;
}

.project h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
}

.project h2 a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.project h2 a:hover {
  border-bottom-color: #111;
}

.page-content a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #888;
  transition: border-color 0.2s;
}

.page-content a:hover {
  border-bottom-color: #111;
}

/* ── Visit Counter ── */

#visit-counter {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 300;
  color: #000;
  z-index: 5;
  opacity: 0.5;
  letter-spacing: 2px;
}
