/* Apple-themed iOS-style portfolio */
:root {
  --text: rgba(255,255,255,0.95);
  --muted: rgba(255,255,255,0.75);
  --accent: #007aff;
}

/* Reset & base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Inter, Arial, sans-serif;
  background: 
    radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(0, 0, 0, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, #1a1d2e 0%, #0f1118 100%);
  display: flex; justify-content: center; align-items: center;
  color: var(--text);
  overflow-x: auto;
}

/* Phones container */
.phones-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
  transition: none;
  min-width: fit-content;
  position: relative;
}

.phones-container.show-experience {
  justify-content: center;
}

/* Phone frame */
.phone-frame {
  background: #000;
  border-radius: 50px;
  padding: 20px;
  width: 396px;
  height: 836px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05), 0 20px 60px rgba(0,0,0,0.8), 0 0 100px rgba(0,0,0,0.4);
  display: flex; justify-content: center; align-items: center;
  animation: phoneFadeIn 0.6s ease-out;
  flex-shrink: 0;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.main-phone {
  transform: translate3d(0, 0, 0);
  transition: transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.phones-container.show-experience .main-phone {
  transform: translate3d(-80px, 0, 0);
}

@keyframes phoneFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dynamic-island {
  position: absolute;
  top: 8px; 
  left: 50%; 
  transform: translateX(-50%);
  width: 126px; 
  height: 37px; 
  background: #000;
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
}

.island-indicator {
  width: 6px;
  height: 6px;
  background: #ff9500;
  border-radius: 50%;
  flex-shrink: 0;
}

.island-camera {
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
}

.island-camera::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: #000;
  border-radius: 50%;
}

/* Screen layout */
.screen {
  width: 100%; height: 100%; border-radius: 34px;
  display: grid; grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/wallpaper.jpg') center/cover no-repeat;
  background-size: cover;
  filter: blur(1px);
  z-index: 0;
  pointer-events: none;
}
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 10%, rgba(255,255,255,0.06), rgba(0,0,0,0.05));
  pointer-events: none;
  z-index: 1;
}
.screen > * {
  position: relative;
  z-index: 1;
}

/* Status bar */
.statusbar { 
  display: flex; 
  justify-content: space-between; 
  font-size: 13px; 
  opacity: 0.95; 
  align-items: center; 
  position: relative;
  z-index: 2;
  padding: 0 10px;
  color: rgba(255,255,255,0.95);
}
.statusbar > span {
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.statusbar > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.statusbar .signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}
.statusbar .signal .bar {
  width: 2.5px;
  background: rgba(255,255,255,0.9);
  border-radius: 0.5px;
}
.statusbar .signal .bar:nth-child(1) {
  height: 3px;
}
.statusbar .signal .bar:nth-child(2) {
  height: 4px;
}
.statusbar .signal .bar:nth-child(3) {
  height: 6px;
}
.statusbar .signal .bar:nth-child(4) {
  height: 8px;
}
.statusbar .battery {
  display: inline-block;
  width: 20px;
  height: 10px;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 1.5px;
  position: relative;
  background: transparent;
  flex-shrink: 0;
}
.statusbar .battery::before {
  content: '';
  position: absolute;
  right: -2px;
  top: 2px;
  width: 1.5px;
  height: 5px;
  background: rgba(255,255,255,0.9);
  border-radius: 0 0.75px 0.75px 0;
}
.statusbar .battery::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 1px;
  bottom: 1px;
  width: 13.5px;
  background: rgba(255,255,255,0.9);
  border-radius: 1px;
}

/* Widgets */
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 10px; }
.widget {
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  padding: 14px;
  color: #000;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(18px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.about h1 { font-size: 16px; margin-bottom: 6px; }
.about .subtitle { color: var(--accent); font-weight: 400; font-size: 10px; text-align: left; line-height: 1.4; }
.about .tagline { color: #333; font-size: 11px; margin-top: 4px; }

/* Notes widget - iOS Notes style */
.notes {
  background: #fff;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  max-width: 100%;
}

.notes-header {
  background: linear-gradient(135deg, #ffd60a 0%, #ffcc00 100%);
  padding: 9px 13px 6px 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.notes-folder-icon {
  width: 16px;
  height: 14px;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
}

.notes-folder-icon::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 11px;
  border: 2px solid white;
  border-radius: 2px 2px 0 0;
  top: 2px;
  left: 0;
  box-sizing: border-box;
}

.notes-folder-icon::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 4px;
  border: 2px solid white;
  border-bottom: none;
  border-right: none;
  border-radius: 2px 0 0 0;
  top: 0;
  left: 2px;
  box-sizing: border-box;
}

.notes h2 {
  font-size: 12.6px;
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.notes-list {
  padding: 0;
  background: #fff;
}

.note-item {
  padding: 8px 14px;
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
}

.note-item:last-child {
  border-bottom: none;
}

.note-title {
  font-size: 10px;
  font-weight: 600;
  color: #000;
  margin-bottom: 2px;
}

.note-meta {
  font-size: 9px;
  color: #666;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App grid */
.apps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-content: start;
}

.app-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.row-divider {
  height: 1px;
  width: 100%;
  margin: 2px 0 4px 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0.25) 50%,
    rgba(255,255,255,0.15) 80%,
    transparent 100%
  );
}

.row-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 10px;
  justify-items: center;
}
.icon { 
  display: grid; 
  justify-items: center; 
  gap: 3px; 
  cursor: pointer;
  transition: transform 0.2s ease;
}
.icon a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}
.icon:hover {
  transform: translateY(-2px);
}
.icon:hover .tile {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.tile {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  display: grid; place-items: center;
  font-size: 28px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s ease;
  cursor: pointer;
}
.tile:active {
  transform: scale(0.95);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.2s ease;
}
.tile img[src*="xcode.png"] {
  width: 106%;
  height: 106%;
  transform: translateY(-1px);
}
.tile img[src*="swiftui.png"] {
  width: 108%;
  height: 108%;
  transform: translateY(-2px);
}
.icon:hover .tile img {
  transform: scale(1.05);
}
.icon:hover .tile img[src*="xcode.png"] {
  transform: translateY(-1px) scale(1.05);
}
.icon:hover .tile img[src*="swiftui.png"] {
  transform: translateY(-2px) scale(1.15);
}
.label { 
  font-size: 11px; 
  color: rgba(255,255,255,0.9); 
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease;
}
.icon:hover .label {
  opacity: 0.8;
}

/* Dock */
.dock-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.dock {
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,0.3);
  border-radius: 20px; padding: 8px 12px;
  backdrop-filter: blur(25px);
}
.dock a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}
.dock .tile { 
  background: rgba(255,255,255,0.85); 
  width: 57px; 
  height: 57px; 
  font-size: 22px; 
  border-radius: 14px; 
  overflow: hidden;
}
.dock .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.dock .tile img[src*="email.png"] {
  width: 105%;
  height: 105%;
}
.dock .tile {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dock a:hover .tile {
  transform: scale(1.1);
}
.dock a:active .tile {
  transform: scale(0.95);
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #000;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

.modal-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
  color: #000;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.modal-content p {
  margin-bottom: 12px;
}

.modal-content strong {
  color: var(--accent);
  font-weight: 600;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.modal-tech span {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.modal-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-link:hover {
  background: #0056cc;
  transform: translateY(-1px);
}

.modal-link:active {
  transform: translateY(0);
}

/* Widget animations */
.widget {
  animation: fadeInUp 0.5s ease-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

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

/* App icon animations */
.icon {
  animation: fadeInScale 0.4s ease-out backwards;
}

.icon:nth-child(1) { animation-delay: 0.05s; }
.icon:nth-child(2) { animation-delay: 0.1s; }
.icon:nth-child(3) { animation-delay: 0.15s; }
.icon:nth-child(4) { animation-delay: 0.2s; }
.icon:nth-child(5) { animation-delay: 0.25s; }
.icon:nth-child(6) { animation-delay: 0.3s; }
.icon:nth-child(7) { animation-delay: 0.35s; }
.icon:nth-child(8) { animation-delay: 0.4s; }
.icon:nth-child(9) { animation-delay: 0.45s; }
.icon:nth-child(10) { animation-delay: 0.5s; }
.icon:nth-child(11) { animation-delay: 0.55s; }
.icon:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Notes item hover */
.note-item {
  transition: background 0.2s ease;
  cursor: pointer;
}

.note-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Experience content */
.experience-content {
  width: 0;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition: none;
  transform: translateX(20px);
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-left: 0;
  padding-left: 0;
}

.experience-content.visible {
  width: 500px;
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.experience-content-inner {
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.exp-line {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.exp-line.animate {
  opacity: 1;
  transform: translateY(0);
}

.exp-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.exp-icon {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.exp-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.exp-title-section {
  flex: 1;
  min-width: 0;
}

.exp-title {
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.exp-role {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 0;
  margin-top: 6px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exp-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin: 0;
  margin-top: 4px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exp-body {
  color: rgba(255, 255, 255, 0.95);
  flex: 1;
}

.exp-body p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exp-bullet {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  padding-left: 20px;
  margin-left: -20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

.exp-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.exp-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exp-link:hover {
  border-bottom-color: rgba(255, 255, 255, 0.7);
}

.exp-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.exp-tech span {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exp-dismiss-button {
  margin-top: 32px;
  margin-bottom: 0;
  padding: 8px 32px;
  width: 100%;
  height: 36px;
  border-radius: 18px;
  background: rgba(0, 122, 255, 0.2);
  border: 1px solid rgba(0, 122, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Inter, Arial, sans-serif;
  align-self: stretch;
}

.exp-dismiss-button:hover {
  background: rgba(0, 122, 255, 0.3);
  border-color: rgba(0, 122, 255, 0.4);
  transform: scale(1.02);
}

.exp-dismiss-button:active {
  transform: scale(0.98);
  background: rgba(0, 122, 255, 0.25);
}

